Operators and Lists friendship

Almost all operators handle the lists in inputs like lists, and they do report lists.

We easily can make it to handle list if like we just extend it, by manually using the same block.


We also can make a block that automatically will handle the list inputs as extensions.

Flatten is irreversible one way process. After we flat an array, we cannot make it go back to itself. That is why operators handling lists like arrays by default is good. Because if there was an operator that handled them as flatten it would be wei-


The join block handles lists as if they are flatten already.


As FLATTEN is an irreversible process, we cannot use the join block to handle lists as arrays. But! Using some dark magic of Snap! we can make a custom join block that would handle them as arrays!

Now, join block acts like any other operator block.

The friendship of Operators and Lists is rescued. The balance in universe is back. :dizzy: :sparkles:

Being serious, why the join block does not work like that by default?

I just wanted to mention, this friendship between lists and reporters has a name, hyperblocks.

I love the name of this thread. "Operators and Lists Friendship" sounds like a wonderful, non-intimidating title for a chapter in book. Thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.