Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Atomic, Composable Financial Transactions: The Power of Haskell's Purity and ADT (reddit.com)
5 points by clusterfoo on April 2, 2015 | hide | past | favorite | 1 comment


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.

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...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: