ZVON > References > Haskell reference
| Indexes | Syntax | >> Prelude << | Ratio | Complex | Numeric | Ix | Array | List | Maybe | Char | Monad | IO | Directory | System | Time | Locale | CPUTime | Random

Module: Prelude
Operator: (.)
Type: (a -> b) -> (c -> a) -> c -> b
Priority: 9
Description: function composition
Related:
Keywords: function composition
Bibliography: FUNCTIONAL PROGRAMMING: Function Composition
MATHWORLD Composition

Example 1

Input: (negate . abs) (-1)

Output: -1

Example 2

Input: (reverse . take 10 . enumFrom) 10

Output: [19,18,17,16,15,14,13,12,11,10]

Example 3

Input: (abs . snd)(-1,-3)

Output: 3

Example 4

Input: ((2+).(3*).(4-)) 2

Output: 8