From a discussion in /r/rust. Great overall discussion about the benefits of Haskell-like abstractions. This example almost looks like magic, it really helped me understand the power of these abstractions.<p>Often people (including myself), will ask "why bother", "why should I get a PhD in abstract math just to write a damn script. They're all turing complete languages after all."<p>Here is a perfect, down to earth example! So simple even I got it!<p>p.s: Not being a Haskell guy, I had to use these resources to figure out wtf was going on; they might help you too:<p>- explains Functor: <a href="http://en.wikibooks.org/wiki/Haskell/The_Functor_class" rel="nofollow">http://en.wikibooks.org/wiki/Haskell/The_Functor_class</a><p>- explains Monad: <a href="http://en.wikibooks.org/wiki/Haskell/Understanding_monads" rel="nofollow">http://en.wikibooks.org/wiki/Haskell/Understanding_monads</a><p>- explains retry: <a href="http://chimera.labs.oreilly.com/books/1230000000929/ch10.html#sec_stm-block-until-changes" rel="nofollow">http://chimera.labs.oreilly.com/books/1230000000929/ch10.htm...</a>