Church integer

Computing Dictionary

Church integer definition

theory
A representation of integers as functions invented by Alonzo Church, inventor of lambda-calculus. The integer N is represented as a higher-order function which applies a given function N times to a given expression. In the pure lambda-calculus there are no constants but numbers can be represented by Church integers.
A Haskell function to return a given Church integer could be written:
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) 0
See also von Neumann integer.
(1994-11-29)

The Free On-line Dictionary of Computing, © Denis Howe 2010 http://foldoc.org
Cite This Source
Explore Dictionary.com
Previous Definition: church in-visible
Next Definition: church invisible
Words Near: church integer
More from Thesaurus.com
Synonyms and Antonyms for church integer
More from Reference.com
Search for articles containing church integer
More from Dictionary.com Translator
Dictionary.com Word FAQs

Dictionary.com presents 366 FAQs, incorporating some of the frequently asked questions from the past with newer queries.

Copyright © 2014 Dictionary.com, LLC. All rights reserved.
  • Please Login or Sign Up to use the Recent Searches feature