Kleislify-0.0.4: Variants of Control.Arrow functions, specialised to kleislis.

Portability portable experimental dylan@techtangents.com Safe-Infered

Control.Kleislify

Description

Precomposition and postcomposition of functors and monads.

Variants of Control.Arrow functions, specialised to kleislis. Avoids boxing into Kleisli values.

Synopsis

• (^=>) :: Monad m => (b -> c) -> (c -> m d) -> b -> m d
• (^->) :: Functor f => (b -> c) -> (c -> f d) -> b -> f d
• (=>^) :: Monad m => (b -> m c) -> (c -> d) -> b -> m d
• (->^) :: Functor f => (b -> f c) -> (c -> d) -> b -> f d
• (<=^) :: Monad m => (c -> m d) -> (b -> c) -> b -> m d
• (<-^) :: Functor f => (c -> f d) -> (b -> c) -> b -> f d
• (^<=) :: Monad m => (c -> d) -> (b -> m c) -> b -> m d
• (^<-) :: Functor f => (c -> d) -> (b -> f c) -> b -> f d

# Documentation

(^=>) :: Monad m => (b -> c) -> (c -> m d) -> b -> m dSource

precomposition of a monad with a pure function. Equivalent to `^>>` Equivalent to 'flip (.)'

(^->) :: Functor f => (b -> c) -> (c -> f d) -> b -> f dSource

precomposition of a functor with a pure function. Equivalent to 'flip (.)'

(=>^) :: Monad m => (b -> m c) -> (c -> d) -> b -> m dSource

postcomposition of a monad with a pure function. Equivalent to `>>^`

(->^) :: Functor f => (b -> f c) -> (c -> d) -> b -> f dSource

postcomposition of a functor with a pure function. Equivalent to `>>^`

(<=^) :: Monad m => (c -> m d) -> (b -> c) -> b -> m dSource

precomposition of a monad with a pure function (right-to-left variant). Equivalent to `<<^` Equivalent to `.`

(<-^) :: Functor f => (c -> f d) -> (b -> c) -> b -> f dSource

precomposition of a functor with a pure function (right-to-left variant). Equivalent to `<<^` Equivalent to `.`

(^<=) :: Monad m => (c -> d) -> (b -> m c) -> b -> m dSource

postcomposition of a monad with a pure function (right-to-left variant). Equivalent to `^<<`

(^<-) :: Functor f => (c -> d) -> (b -> f c) -> b -> f dSource

postcomposition of a functor with a pure function (right-to-left variant). Equivalent to `^<<`