diff options
Diffstat (limited to 'day3.k')
-rw-r--r-- | day3.k | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/day3.k b/day3.k index f4e8791..92812cc 100644 --- a/day3.k +++ b/day3.k @@ -1,10 +1,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; -u: {x@*:'=x}; -r: u@ +\ (, 0 0) , z; -#r +r: +\ (, 0 0) , z; +#?r z2: + -1 2 # z; / alternating split -r2: u@ ,/ +\' (,0 0) ,/: z2; -#r2 +r2: ,/ +\' (,0 0) ,/: z2; +#?r2 |