Where can I learn advanced Haskell?

Posted by FredOverflow on Stack Overflow See other posts from Stack Overflow or by FredOverflow
Published on 2011-01-08T16:53:20Z Indexed on 2011/01/08 17:54 UTC
Read the original article Hit count: 222

Filed under:
|
|
|
|

In a comment to one of my answers, SO user sdcwc essentially pointed out that the following code:

comb 0 = [[]]

comb n =
    let rest = comb (n-1)
    in  map ('0':) rest
     ++ map ('1':) rest

could be replaced by:

comb n = replicateM n "01"

which had me completely stunned.

Now I am looking for a tutorial, book or PDF that teaches these advanced concepts. I am not looking for a "what's a monad" tutorial aimed at beginners or online references explaining the type of replicateM. I want to learn how to think in monads and use them effectively, monadic "patterns" if you will.

© Stack Overflow or respective owner

Related posts about haskell

Related posts about tutorials