straight line floodfill SIMPLIFIED by kaki

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