Copyright | Copyright © 2015 PivotCloud Inc. |
---|---|

License | MIT |

Maintainer | Lars Kuhtz <lkuhtz@pivotmail.com> |

Stability | experimental |

Safe Haskell | Safe |

Language | Haskell2010 |

Useful operators for defining functions in an applicative context

- (%) :: (a -> b) -> a -> b
- (×) :: (a -> b) -> a -> b
- (<*<) :: Applicative f => f (b -> c) -> f (a -> b) -> f (a -> c)
- (>*>) :: Applicative f => f (a -> b) -> f (b -> c) -> f (a -> c)
- (<$<) :: Functor f => (b -> c) -> f (a -> b) -> f (a -> c)
- (>$>) :: Functor f => f (a -> b) -> (b -> c) -> f (a -> c)
- (<.>) :: Applicative f => f (b -> c) -> f (a -> b) -> f (a -> c)
- (⊙) :: Applicative f => f (b -> c) -> f (a -> b) -> f (a -> c)

# Documentation

(%) :: (a -> b) -> a -> b infixr 5 Source #

This operator is an alternative for `$`

with a higher precedence. It is
suitable for usage within applicative style code without the need to add
parenthesis.

(×) :: (a -> b) -> a -> b infixr 5 Source #

This operator is a UTF-8 version of `%`

which is an alternative for `$`

with a higher precedence. It is suitable for usage within applicative style
code without the need to add parenthesis.

The hex value of the UTF-8 character × is 0x00d7.

In VIM type: `Ctrl-V u 00d7`

You may also define a key binding by adding something like the following line to your vim configuration file:

iabbrev <buffer> >< ×

(<*<) :: Applicative f => f (b -> c) -> f (a -> b) -> f (a -> c) infixr 4 Source #

Functional composition for applicative functors.

(>*>) :: Applicative f => f (a -> b) -> f (b -> c) -> f (a -> c) infixr 4 Source #

Functional composition for applicative functors with its arguments flipped.

(<$<) :: Functor f => (b -> c) -> f (a -> b) -> f (a -> c) infixr 4 Source #

Applicative functional composition between a pure function and an applicative function.

(>$>) :: Functor f => f (a -> b) -> (b -> c) -> f (a -> c) infixr 4 Source #

Applicative functional composition between a pure function and an applicative function with its arguments flipped.

(<.>) :: Applicative f => f (b -> c) -> f (a -> b) -> f (a -> c) infixr 4 Source #

Deprecated: use `<*<`

instead

Functional composition for applicative functors.

This is a rather popular operator. Due to conflicts (for instance with the lens package) it may have to be imported qualified.

(⊙) :: Applicative f => f (b -> c) -> f (a -> b) -> f (a -> c) infixr 4 Source #