. package:base

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.
Bitwise "and"
Infix version of shiftL.
Infix version of shiftR.
Infix version of xor.
Bitwise "or"
Infix version of unsafeShiftL.
Infix version of unsafeShiftR.
Composition of functors