day 25 optimize and improve heuristics
[aoc_eblake.git] / 2023 / day01.golfm4
blob524a3213ca53050eb732a5c91e791f12629ad04c
1 define(_,`ifelse($1,=,`eval($2)',$1,/,`substr$2',$1$2,$3>,,$1$2,>,`+_(/,(
2 .$3$3,len($3),2))',$1,>,,$1$3,<,,$1$3ne,<o$4,1$2,$1$3wo,<t$4,2$2,$1$3hr$5$6,
3 <t$4ee,3$2,$1$3ou$5,<f$4r,4$2,$1$3iv$5,<f$4e,5$2,$1$3ix,<s$4,6$2,$1$3ev$5$6,
4 <s$4en,7$2,$1$3ig$5$6,<e$4ht,8$2,$1$3in$5,<n$4e,9$2,$1translit($3,1-9),<,
5 $3$2,$1,<,$2,$1,.,`) _(=,',`_(>,$1,$6)_($2,$3,$4,$5,_(/,(.$8,1,1)),_(<,$6,
6 $1),_(<,$7,$1,$2$3,$4,$5),_(/,(.$8,2)))_(>,$1,$7)')')_(=,_(,,,,,,,include(I).))