straight line floodfill by kaki

((^l((rec(f x y)(#3=(^,j(do((r""#f)(x x #2=(+ . ,x))(y y(+ y j)))((char>? #1=(~ l(+ y j)#2#)#\ )(or(eq? #1##\.)r(f x y)))(set! #1##\.)))-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