News for hackers. Stuff that matters.
Re:Haskell Concepts in One Sentence by Tarean on Sunday March 26, 2017 @04:44AM (#13959823)
I think an easier to understand definition uses fmap and join. Example:

    f x = [x, x*2]

    f =<< [5, 3, 4]
    join (fmap f [5, 3, 4])
    join ([[5, 10], [3, 6], [4, 8]])
    [5, 10, 3, 6, 4, 8]
So the pattern is fmap a function `a -> f b`; this leaves us with `f (f b)` so we flatten. You might notice that we could bind as often as we want since we always get a list of integers!
Re:Haskell Concepts in One Sentence by StavrosK on Sunday March 26, 2017 @05:09AM (#13959879)
I think if you already know fmap, join and Haskell syntax, you also already know monads, so I'm not sure whom this is easier for :P