Safe Haskell | Safe |
---|---|

Language | Haskell2010 |

- ap :: Applicative f => f (a -> b) -> f a -> f b
- lift2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c
- lift3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
- (<*) :: Applicative f => f (a -> b) -> f a -> f b
- (*>) :: Applicative f => f a -> f (a -> b) -> f b
- (<$*) :: Applicative f => (a -> b -> c) -> f a -> f b -> f c
- (*$>) :: Applicative f => f a -> (a -> b -> c) -> f b -> f c
- (<$**) :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
- (**$>) :: Applicative f => f a -> (a -> b -> c -> d) -> f b -> f c -> f d

# Documentation

ap :: Applicative f => f (a -> b) -> f a -> f b Source #

A simple alias for `<*>`

`>>>`

Just 5`ap (Just (+1)) (Just 4)`

lift2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c Source #

An alias for `lift2`

, updating with unified "lift" naming

`>>>`

Just 5`lift2 (+) (Just 4) (Just 1)`

lift3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d Source #

An alias for `lift3`

, updating with unified "lift" naming

`>>>`

Just 24`lift3 (\x y z -> x * y * z) (Just 4) (Just 3) (Just 2)`

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

Right-associative, left-flowing applicative operator

`>>>`

Just 5`Just (+1) <* Just 4`

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

Left-associative, right-flowing applicative operator

`>>>`

Just 5`Just 4 *> Just (+1)`

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

Right-associative, left-flowing `lift2`

operator

`>>>`

Just 5`(+) <$* Just 4 |< Just 1`

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

Left-associative, right-flowing `lift2`

operator

`>>>`

Just 5`Just 4 >| Just 1 *$> (+)`

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

Right-associative, left-flowing `lift3`

operator

`>>>`

Just 24`(\x y z -> x * y * z) <$** Just 4 |< Just 3 |< Just 2`

(**$>) :: Applicative f => f a -> (a -> b -> c -> d) -> f b -> f c -> f d infixl 4 Source #

Left-associative, right-flowing `lift3`

operator

`>>>`

Just 24`Just 2 >| Just 3 >| Just 4 **$> \x y z -> x * y * z`