
16 Oct
2012
16 Oct
'12
3:45 p.m.
Not sure I really have anything substantial to contribute, but it's certainly true that if you see
a -> m b
as a generalisation of the usual function type, a -> b, then return generalises the identity and
kleisli generalises function composition. This makes the types pretty memorable (and often the
definitions too).
Simon
On 16 Oct 2012, at 20:14, David Thomas
class Monad m where return :: a -> m a kleisli :: (a -> m b) -> (b -> m c) -> (a -> m c)
Simon Thompson | Professor of Logic and Computation School of Computing | University of Kent | Canterbury, CT2 7NF, UK s.j.thompson@kent.ac.uk | M +44 7986 085754 | W www.cs.kent.ac.uk/~sjt