I often find these functions helpful and end up defining them:
fromLeftM :: Monad m => (b -> m a) -> m (Either a b) -> m a
fromLeftM = eitherM pure
fromRightM :: Monad m => (a -> m b) -> m (Either a b) -> m b
fromRightM f = eitherM f pure
I was wondering what you thought about including them in extra?
I often find these functions helpful and end up defining them:
I was wondering what you thought about including them in
extra?