about summary refs log tree commit diff
path: root/day3.k
blob: 92812ccfa111093f0f82e6985d0b56237e92206e (plain) (blame)
1
2
3
4
5
6
7
8
9
d: *0:"day3";
/ with case z:{:[x=">";1 0;x="<";-1 0;x="^";0 1;x="v";0 -1; 0 0]}'d;
z: (1 0;-1 0;0 1;0 -1) @ "<>^v"?/:d;
r: +\ (, 0 0) , z;
#?r

z2: + -1 2 # z; / alternating split
r2: ,/ +\' (,0 0) ,/: z2;
#?r2