Frank Atanassow said:
What do you mean by a "fork"?
So, the question is, if i have
f : A -> T B and g : A -> T C
where T is a monad, i.e. an endofunctor, can i combine f and g as
<f,g> : A -> T (BxC)
knowing that T involves side effects?
I guess you are asking: if category C has finite products, and T is a strong monad on C, does the Kleisli category have finite products? The answer, I imagine, is "not in general", but "yes" if the monad is commutative.
pair :: (a -> m b) -> (a -> m c) -> (a -> m (b,c))
pair f g a = do b <- f a
c <- g a
return (b, c)You need to pick an order for the first two actions.
I haven't done the proof, though.
Regards, Frank
_______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
