Skip to content
scrambled
Programming Language Theory Flashcard

How to encode booleans and conditionals using church booleans in lambda calculus?

Question

How to encode booleans and conditionals using church booleans in lambda calculus?

Answer

Booleans:

tru=λf. λs. ffls=λf. λs. s

Conditionals (call-by-name):

test=λc. λt. λe. c t e