• Exported names:
  • Imported modules:

Module Data.Function

This module provides some utility functions for function application.

Author: Bjoern Peemoeller

Version: July 2013

Summary of exported operations:

fix :: (a -> a) -> a  Deterministic 
fix f is the least fixed point of the function f, i.e.
on :: (a -> a -> b) -> (c -> a) -> c -> c -> b  Deterministic 
on f g x y applies the binary operation f to the results of applying operation g to two arguments x and y.

Exported operations:

fix :: (a -> a) -> a  Deterministic 

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

on :: (a -> a -> b) -> (c -> a) -> c -> c -> b  Deterministic 

on f g x y applies the binary operation f to the results of applying operation g to two arguments x and y. Thus, it transforms two inputs and combines the outputs.

(*) `on` f = \x y -> f x * f y

A typical usage of this operation is:

sortBy ((<=) `on` fst)