day 13 golf some more
[aoc_eblake.git] / 2022 / day13.golfm4
blob357dca6adb7f018f24b3a1b01800fd4a22afcae2
1 define(d,defn(define))d(f,$1)d(a)d(s,defn(shift))d(c,`+0ifelse($1,$2,`c(',$1,,
2 `1a(',$2,,`a(',a$1a$2,,`c(f$1,f$2,(s$1),(s$2),',a$1,,`c($1,($2),',a$2,,
3 `c(($1),$2,',`+($1<$2)a(')s(s($@)))')eval(translit(_(,1,include(i)),[
4 ],(,)d(_,`ifelse($3,,`) eval((1$1)*(2',`c($3,$4)*$2_(c($3,2)c($4,2)$1,
5 -~$2s(s(s(s($@)))))c($3,6)c($4,6)')'))))