invertible-0.2.0.7: bidirectional arrows, bijective functions, and invariant functors

Data.Invertible.Monad

Description

Using bijections with monads.

bind :: Monad m => (a -> m b) -> (b -> m a) -> m a <-> m b Source #

Bind two functions to create a Control.Invertible.MonadArrow-form bijection.

(=<<->>=) :: Monad m => (a -> m b) -> (b -> m a) -> m a <-> m b infix 2 Source #

Crazy operator form of bind.

bind

liftM :: Monad m => (a <-> b) -> m a <-> m b Source #

Promote a bijection to a Control.Invertible.MonadArrow-form bijection. (Equivalent to bifmap and biarr.)

bifmap

biarr