Conditionals in Lambda Calculus
Example evaluation of a conditional
(a case where the condition is true).
if true then apple else pear
?x. ?y. ?z. ((x y) z) true apple pear
?x. ?y. ?z. ((x y) z) ?x?.?y?.x? apple pear
?y. ?z. ((?x?.?y?.x? y) z) apple pear
?z. ((?x?.?y?.x? apple ) z) pear
((?x?.?y?.x? apple ) pear)