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

Language | Haskell2010 |

# Documentation

(<|) :: (a -> b) -> a -> b infixr 0 Source #

Left-flowing application, equivalent to 'prelude.$'.

Read as "backwards application", "pipe from", or "pull from".

`>>>`

True`(f <| x) == f x`

`>>>`

True`(g <| f <| x) == g (f x)`

This operator can be chained together to show the dataflow through a series of functions

`>>>`

-4`negate <| succ <| 3 :: Int`

(|>) :: a -> (a -> b) -> b infixl 0 Source #

Right-flowing application, equivalent to 'prelude.$'.

Read as "forwards application" or "pipe into".

`>>>`

True`(x |> f) == f x`

`>>>`

True`(x |> f |> g) == g (f x)`

This operator can be chained together to show the dataflow through a series of functions

`>>>`

-4`3 |> succ |> negate :: Int`

(|<) :: (a -> b) -> a -> b infixl 0 Source #

Left-flowing, left-associative application

Read as "pipe into the result of". It may seem odd in trivial cases, but is useful for functions that take more than one argument, as it will partially apply arguments one at a time.

`>>>`

True`(f |< x) == f x`

`>>>`

True`(h |< y |< x) == ((h <| y) <| x)`

Can be chained together to show the dataflow through a series of functions

`>>>`

8`(+) |< 3 |< 5 :: Int`

(>|) :: a -> (a -> b) -> b infixr 0 Source #

Right-flowing, right-associative application

Read as "pipe from the result of", or "pull from the result from". It may seem odd in trivial cases, but is useful for functions that take more than one argument.

`>>>`

True`(x >| f) == f x`

`>>>`

True`(x >| y >| h) == (x |> (y |> h))`

Can be chained together to show the dataflow through a series of functions

`>>>`

8`3 >| 5 >| (+)`