flow-er-1.0.3: More directional operators

Safe HaskellSafe
LanguageHaskell2010

Control.Flower.Compose

Description

 

Synopsis

Documentation

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

Left-flowing, right-associative composition

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

Can be combined with application combinators

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

(.>) :: (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

Can be combined with application combinators

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