4 ms·
That approach is used at length in Real World Haskell. For example, some code for key-value lookup is shown that deals with a series of Maybe foo values, first
by nandemo 13y ago
That approach is used at length in Real World Haskell. For example, some code for key-value lookup is shown that deals with a series of Maybe foo values, first with a cascade of guards (think a cascade of if-else's), and later with monad syntax. There are other examples.
http://book.realworldhaskell.org/read/programming-with-monads.html http://book.realworldhaskell.org/read/programming-with-monad...
- lobster_johnson 13y agoI enjoyed RWH much more after having learned a lot of the basics. It starts off simple, to be sure, but then quickly jumps into the deep end. For a book that's about real-world stuff it gets into a lot of unnecessary detail, too, that should have been deferred until later "advanced" chapters. I appreciated the hands-on approach to real examples, though. "Learn You A Haskell For Great Good" [1], while much less complete, is the best intro I have found so far. It's also free. [1] http://learnyouahaskell.com/ http://learnyouahaskell.com/