News for hackers. Stuff that matters.
Re:Why isn't Haskell popular in industry? by chc on Monday August 02, 2010 @01:38PM (#1568334)
Here's a common example of a monad being used in a non-stateful way:

  map (* 2) [1,2,3,4]
Yep, that's a function on a monad — lists are monads. The same function can be written:

  [1,2,3,4] >>= return . (* 2)

There are no comments on this comment yet.