Atomic, Composable Financial Transactions: The Power of Haskell's Purity and ADT
reddit.com
reddit.com
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."
Here is a perfect, down to earth example! So simple even I got it!
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:
- explains Functor: http://en.wikibooks.org/wiki/Haskell/The_Functor_class
- explains Monad: http://en.wikibooks.org/wiki/Haskell/Understanding_monads
- explains retry: http://chimera.labs.oreilly.com/books/1230000000929/ch10.htm...