Raul,

I cannot understand how *unpack* works.
When I use 9!:3]6 to display *unpack* I get the following.

((-.&;:)&'-');._2


But that does not help me because I cannot process the parenthesized parts
separately.

The only "part" I can process is

;: ;. _2 in

where *in* is defined as follows.


   in =: 0 : 0
start-A
start-b
A-c
A-b
b-d
A-end
b-end
)


But then I lose the ability to process the rest of *unpack* because the
LF's are gone.

So I suspect my problem is a parsing order unknown.

Can you say how *unpack* is parsed, please?

unpack=:-.&;:&'-';._2

On Sat, Jan 1, 2022 at 11:52 PM Raul Miller <[email protected]> wrote:

> https://adventofcode.com/2021/day/12
>
> For day 12, we had a "cave map" which was a list of connections
> between named pairs of rooms.
>
> unpack=:-.&;:&'-';._2
>
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to