CHURCH INTEGER
\t͡ʃˈɜːt͡ʃ ˈɪntɪd͡ʒə], \tʃˈɜːtʃ ˈɪntɪdʒə], \tʃ_ˈɜː_tʃ ˈɪ_n_t_ɪ_dʒ_ə]\
Sort: Oldest first
-
A representation of integers as functions invented byAlonzo Church, inventor of lambda-calculus. The integer Nis represented as a higher-order function which applies agiven function N times to a given expression. In the purelambda-calculus there are no constants but numbers can berepresented by Church integers.A Haskell function to return a given Church integer could bewritten:church n = c where c f x = if n == 0 then x else c' f (f x) where c' = church (n-1)A function to turn a Church integer into an ordinary integer:unchurch c = c (+1) 0See also von Neumann integer.
By Denis Howe
Word of the day
SQ10,643
- A serotonin antagonist with limited antihistaminic, anticholinergic, and immunosuppressive activity.