In the previous
article I gave the conceptual background necessary to understand what monads
are. Now I'm going to get into more of the details.
( Read more )
good tutorial
anonymous
March 19 2011, 13:24:00 UTC
Thanks for this very comprehensive tutorial. I have absolutely no experience with Haskell, but have read something about Monads, which I did not understand (in "Beautiful Code", btw, a great book). Now it makes perfect sense.
I think the topic cannot be explained much better, assuming only some programming experience and the tiniest bit of understanding of functional programming.
Comments 6
"we'd write this (using Maybe as our example instnace):"
"putStrLn "unpacks" that line of text from the monadic value, prints it back to the terminal, "
Doesn't >>= unpacks the value
"what the >>= operator is doing is taking that string (called s here) and printing it."
Isn't putStrLn doing the printing?
-Lakshmi Narasimhan
Reply
Reply
I think the topic cannot be explained much better, assuming only some programming experience and the tiniest bit of understanding of functional programming.
Reply
Reply
Reply
Reply
Leave a comment