Microsoft Store
 

Church boolean


 

In computer science, a Church boolean is a conceptual function that takes two lazy evaluation parameters (such as blocks or lambda's) and evaluates either the first or the second. The concept is named after Alonzo Church, inventor of the Lambda Calculus. There are only two Church booleans: true and false. Some programming languages use these as implementation model for boolean arithmetic, examples are Smalltalk and Pico programming language.

Related Topics:
Computer science - Lazy evaluation - Alonzo Church - Lambda Calculus - Smalltalk - Pico programming language

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Formal Definition in Lambda Calculus:

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

true=λab.a

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

false=λab.b

~ ~ ~ ~ ~ ~ ~ ~ ~ ~