# Join operator for generated lists of polygons

**URL:** <https://cl.desmos.com/t/join-operator-for-generated-lists-of-polygons/5100>\
**Category:** Questions\
**Created:** [September 9, 2023, 10:24pm UTC](https://cl.desmos.com/t/join-operator-for-generated-lists-of-polygons/5100 "2023-09-09T22:24:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve\_Heller](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/steve_heller/32/3539_2.png) [@Steve\_Heller](https://cl.desmos.com/u/Steve_Heller)\
**Post date:** [September 9, 2023, 10:24pm UTC](https://cl.desmos.com/t/join-operator-for-generated-lists-of-polygons/5100/1 "2023-09-09T22:24:55Z")

</div>

I want something like the sum operator (big sigma) for join so I can produce one final list by joining the expressions at each index. Or a list comprehension that produces lists to be joined, not list elements?

I’m working on a string art activity, so I have lots of lists of polygons.

I know I can turn the code inside out (that’s how I started), but the code is much more abstract now.

I noticed some dark magic use of Sigma in discussions of list manipulation, but I haven’t been able to sort that out.

Here’s a way stripped down example:

> **[merging lists of polygons](https://www.desmos.com/calculator/gnvsh9d5i8)**
>
> Explore math with our beautiful, free online graphing calculator. Graph functions, plot points, visualize algebraic equations, add sliders, animate graphs, and more.

Thanks!

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [September 11, 2023, 2:23pm UTC](https://cl.desmos.com/t/join-operator-for-generated-lists-of-polygons/5100/2 "2023-09-11T14:23:19Z")

</div>

Here’s what I came up with using list comprehension. It’s not actually joining the former list. It creates the whole list but integrating the sum and differences within using the t\_sign list. [merging lists of polygons | Desmos](https://www.desmos.com/calculator/z7474azzsp)

---

<div class="post-metadata">

**Author:** ![Steve\_Heller](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/steve_heller/32/3539_2.png) [@Steve\_Heller](https://cl.desmos.com/u/Steve_Heller)\
**Post date:** [September 11, 2023, 4:19pm UTC](https://cl.desmos.com/t/join-operator-for-generated-lists-of-polygons/5100/3 "2023-09-11T16:19:54Z")

</div>

Thanks, Daniel. That’s sort of what I meant by inside-out, probably better described as inlining.

If you’re curious …  
I’m trying to get rid of joins in the 20s (code line numbers) and other places:

> **[Strings UNIFIED](https://www.desmos.com/calculator/6qhu81fj8o)**
>
> Explore math with our beautiful, free online graphing calculator. Graph functions, plot points, visualize algebraic equations, add sliders, animate graphs, and more.

Which is driven by:

> **[My Favorite Strings • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/64ed568ff6473c3e0c3e6dc1)**
>
> String Art, shapes made with straight lines, is fun and can produce beautiful art.

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [September 11, 2023, 4:44pm UTC](https://cl.desmos.com/t/join-operator-for-generated-lists-of-polygons/5100/4 "2023-09-11T16:44:16Z")

</div>

I’d say there’s a way, but not without going all the way back to the initial function that uses polygon(), which can’t really be manipulated in list comprehension. At least as far as I understand, you can manipulate functions of lists in list comprehension, but using the join method is just not friendly and needs to be done manually. There are lot of nested functions there that make your job pretty difficult.
