Haskell and algebra
Frank Atanassow
franka@cs.uu.nl
Mon, 11 Aug 2003 17:00:17 +0200
Frank Atanassow wrote:
> Gustavo Villavicencio wrote:
>
> > Hi all,
> >
> > I am trying to understand the algebraic laws and operators
> > behind a functional expression...
> >
> > f >>= g \equiv g* . f
> >
> > in the Kleisli Star context. Is this right?
>
> Yep.
Oops, or rather, not quite.
m >>= g
means
g* m
The Kleisli composition (-)* . (-) is sometimes written as (@@):
(@@) :: (Monad m) => (b -> m c) -> (a -> m b) -> (a -> m c)
(f @@ g) x = let m = f x in m >>= g
Regards,
Frank