. is:exact package:base set:included-with-ghc

Right to left function composition.
(f . g) x = f (g x)
f . id = f = id . f

Examples

>>> map ((*2) . length) [[], [0, 1, 2], [0]]
[0,6,2]
>>> foldr (.) id [(+1), (*3), (^3)] 2
25
>>> let (...) = (.).(.) in ((*2)...(+)) 5 10
30
Morphism composition. Implementations should satisfy the law:
  • Associativity f . (g . h) = (f . g) . h
This means that the way morphisms are grouped is irrelevant, so it is unambiguous to write a composition of morphisms as f . g . h, without parentheses.