
Data.Function  Portability  portable  Stability  experimental  Maintainer  libraries@haskell.org 





Description 
Simple combinators working solely on and with functions.


Synopsis 

id :: a > a   const :: a > b > a   (.) :: (b > c) > (a > b) > a > c   flip :: (a > b > c) > b > a > c   ($) :: (a > b) > a > b   fix :: (a > a) > a   on :: (b > b > c) > (a > b) > a > a > c 



Prelude reexports



Identity function.



Constant function.


(.) :: (b > c) > (a > b) > a > c  Source 


flip :: (a > b > c) > b > a > c  Source 

flip f takes its (first) two arguments in the reverse order of f.


($) :: (a > b) > a > b  Source 


Other combinators



fix f is the least fixed point of the function f,
i.e. the least defined x such that f x = x.


on :: (b > b > c) > (a > b) > a > a > c  Source 

(*) `on` f = \x y > f x * f y.
Typical usage: Data.List.sortBy (compare `on` fst).
Algebraic properties:


Produced by Haddock version 2.3.0 