Monadic fractals
There are an awful lot of monad tutorials out there. Monads as containers is one I saw a link to on haskell-cafe today, and it gives a rather amazing application of the list monad:
f x | x == '#' = "# #"
| otherwise = " "
"#" >>= f >>= f >>= f >>= f
= "# # # # # # # # # # # # # # # #"
And we have a fractal!
[ Entry posted at: Sun Dec 17 03:22:53 2006 | 0 comment(s)... | Cat: Geeky ]
