Re:“Mostly functional” programming does not work (2014)
by marcosdumay on Monday June 22, 2015 @03:33PM
(#9760662)
Oh, God, you just came to the Monad definition...
From my experience, it only really falls in place after you write your first or second monad. To learn that you go in that order:
1 - Get used to use the IO monad in do notation.
2 - Learn a couple more monads. I'd recommend State and one of Parsec or Attoparsec. (As a bonus, use a bit of applicative syntax too.)
3 - Get used to write some somewhat complex one liners without the do notation.
4 - Abuse the List monad for practice.
5 - Write your own.
All the time, look at the types as much as you need, but do not obsess over them.
From my experience, it only really falls in place after you write your first or second monad. To learn that you go in that order:
1 - Get used to use the IO monad in do notation. 2 - Learn a couple more monads. I'd recommend State and one of Parsec or Attoparsec. (As a bonus, use a bit of applicative syntax too.) 3 - Get used to write some somewhat complex one liners without the do notation. 4 - Abuse the List monad for practice. 5 - Write your own.
All the time, look at the types as much as you need, but do not obsess over them.