The Kleisli category
of a monad
on a category
has the same objects as
, while a morphism
in
is a morphism
in
. The identity on
is the component
of the unit.
If
and
represent two Kleisli morphisms, their composition is
the morphism
The unit and associativity laws of the monad make this composition associative and give the stated identities. The Kleisli category packages
computations that produce values carrying the effect represented by .