Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Swift Functors, Applicatives, and Monads in Pictures. Parent comment
That is, a monad is a type parametrized by some other type, with the following two functions:
1) return :: a -> m a 2) (>>=) :: m a -> (a -> m b) -> m b
a) return x >>= f == f x b) m >>= return == m c) (m >>= f) >>= g == m >>= (\x -> f x >>= g)
There are no comments on this comment yet.
That is, a monad is a type parametrized by some other type, with the following two functions:
such that three laws hold: