Portability | portable |
---|---|

Stability | experimental |

Maintainer | dylan@techtangents.com |

Safe Haskell | Safe-Infered |

Precomposition and postcomposition of functors and monads.

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

- (^=>) :: 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 `>>^`