invertible-0.1.2: bidirectional arrows, bijective functions, and invariant functors
Data.Invertible.Monad
Description
Using bijections with monads.
Synopsis
bind :: Monad m => (a -> m b) -> (b -> m a) -> m a <-> m b Source #
Bind two functions to create a BiKleisli-form bijection.
BiKleisli
(=<<->>=) :: 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 BiKleisli-form bijection. (Equivalent to bifmap.)
bifmap