[Haskell-cafe] Join and it's relation to >>= and return
p.turner at computer.org
Mon Jun 7 17:53:37 EDT 2004
On 2004 June 07 Monday 15:19, Ron de Bruijn wrote:
> newtype S a = State -> (a,State) -- functor T to map
> mapS::(a-> b) -> (S a -> S b) -- functor T to map
> unitS :: a -> S a --\eta
> joinS::S(S a)-> S a -- \mu
> This is a complete monad using a direct mapping from
> Category Theory. I really like it, because it's
> mathematically grounded. But I don't know how to map
> this to Haskell monads using the standard "bind" and
> "return", as I explain below.
Wadler's "The Essence of Functional Programming" goes into monads to the point
of relating map, unit, and join to bind and return.
More information about the Haskell-Cafe