Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Simple combinators for functions.
Documentation
data (&) :: a -> (a -> Exp b) -> Exp b infixl 1 Source #
Reverse function application, argument first.
Example
>>>
:kind! Eval ('(True, Nothing) & Fst)
Eval ('(True, Nothing) & Fst) :: Bool = True
data On :: (b -> b -> Exp c) -> (a -> Exp b) -> a -> a -> Exp c Source #
Lift a binary function to the domain of a projection.
Example
>>>
:kind! Eval (((&&) `On` Fst) '(True, Nothing) '(False, Just '()))
Eval (((&&) `On` Fst) '(True, Nothing) '(False, Just '())) :: Bool = False