News for hackers. Stuff that matters.
Re:Haskell Concepts in One Sentence by norswap on Sunday March 26, 2017 @08:27AM (#13960421)
A monad is a "value" of a type X that depends on a type T: X[T]. It must have a "way" to take a function T -> X[T] and apply it to itself so as to get another X[T].

Usually that "way" is a function called "bind" with signature:

    (X[T], (T -> X[T]) -> X[T]
And that's really all there is to it.

Monads are fundamental only in the sense that there happens to be a lot of things for which these structures are useful (lists, optionals, effect wrappers, ...).

There are no comments on this comment yet.