3 ms·
I don't think there's a problem here. We get two functions with a monad m: bind :: m a -> (a -> m b) -> m b return :: a -> m a These allow us to define then
by dwrensha 13y ago
I don't think there's a problem here. We get two functions with a monad m:
bind :: m a -> (a -> m b) -> m b
return :: a -> m a
These allow us to define
then :: m a -> (a -> b) -> m b
then x f = bind x (return . f)
i.e. it's trivial to lift a regular function into the monad.