straight line floodfill SIMPLIFIED by kaki

((^l((rec(f x\)(#3=(^,j(do((r 1(eq? #1=(~ l(+\ j)#2=(+ . ,x))#\.))(x x #2#)(\\(+\ j))(_""(set! #1##\.)))((eq? #1##\#)(or r(f x\)))))-1 0)(#3#1 0)(#3#0 -1)(#3#0 1))(~'(1 10 25)#0=(mod(hash l)5))(~'(3 3 9)#0#))(map print l))(port-map + read-line))

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page