flow-er-1.0.3: More directional operators

Control.Flower.Compose

Description

Synopsis

(<.) :: (b -> c) -> (a -> b) -> a -> c infixr 9 Source #

Left-flowing, right-associative composition

>>> (g <. f) x == (g . f) x True

>>>

(g <. f) x == (g . f) x

Can be combined with application combinators

>>> (+1) <. (*10) <| 5 :: Int 51

(+1) <. (*10) <| 5 :: Int

(.>) :: (a -> b) -> (b -> c) -> a -> c infixl 9 Source #

Right-flowing, left-associative composition

Note that this is the opposite direction from typical composition

>>> (f .> g) x == (g . f) x True

(f .> g) x == (g . f) x

>>> 5 |> (+1) .> (*10) :: Int 60

5 |> (+1) .> (*10) :: Int