I\'m looking for creative uses of monads to learn from. I\'ve read somewhere that monads have been used for example in AI, but being a monad newbie, I fail to see how.
One of my favorite monads is Martin Escardo's search monad. It can be found on hackage in infinite-search package.
It is the monad of "search functions" for a set of elements of type a, namely (a -> Bool) -> Maybe a (finding an element in the set matching a given predicate).