Version 6.5.1 seems to have been released

I think Jens is labelling it as an experimental feature

I guess, but are ≤ and ≥ experimental too? Is the whole relabel-hiding idea experimental? I suppose it could be, but it's still in the manual.

well, the feature itself isn't experimental, but the relabel kludge certainly is :-/

Yay new

Yay!

Thank you, Jens, for adding all these.

And thank you, Simon, for announcing it.

And thank you, Brian, for updating your manual.

Multimap - can you tell me what does that block do?

Nope - never managed to work it out

Let's ask Brian, or, if Jens is willing to spend the time away from actually developing Snap!, to explain it.

I think its Brian's baby :slight_smile:

Just tried it out again and I can't rationalise why it gives [1,1,1] with these two lists

_aoc script pic (1)

The function you used takes only one input. (There is only one empty input slot in it.) Because you gave MULTIMAP two list inputs, it calls the ringed function with two inputs. When the number of actual inputs doesn't match the number of input slots, no substitution is done. The empty input slot is treated as zero by +, so the expression 1+0 is evaluated three times (one for each number in the first list).

MULTIMAP goes through its list inputs in parallel, so it gives the ringed function the inputs 1 and 11, then 2 and 12, then 3 and 13. So if you'd left both input slots in the + block empty, you'd have gotten

Got it :slight_smile:
Have you got a real world example of when this reporter would be useful?

Would you count taking a row of Pascal's triangle and adding it to the same row shifted over one position?

Technically it is but I think we both know what I meant :slight_smile:

But spookily, I've already got a use for it in my 4D Conway's Game Of Life Advent of Code current puzzle :slight_smile:

_aoc script pic (2)

I can use it to see if the top or bottom rows of a 2D matrix within it have a # in it or not

I can then use this info to decide whether I need to expand my matrix or not in the Y direction for the next iteration :slight_smile:

If you have 2 input lists, let's say [1 2 3 4 5] and [5 4 3 2 1] for this example, and put them in with a join block, it will first call the function with all the first items (in this case, 1 and 5) which would result in the string 15. Next, it calls the function with all the second items (2 and 4), which results in 24. The process is repeated for all the items until you get a result:


This can also be used to 'zip' lists, if you use the list reporter:

That's funny, because multimap is implemented using a ZIP block in the library. :~)

No, actually, I don't.

Slightly off-topic, but I'd love to browse through a collection of all your AoC solutions. You're following through very religiously! :slight_smile:

You will regret asking this :slight_smile:

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