10.07.2015 Views

An Introduction to Functional Programming Through Lambda Calculus

An Introduction to Functional Programming Through Lambda Calculus

An Introduction to Functional Programming Through Lambda Calculus

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

- 86 -For boolean functions, we will allow the use of the constants TRUE and FALSE in place of bound variables. Ingeneral, for:def =IF THEN ELSE we will now write:def TRUE = or FALSE = Thus, negation is defined by:NOT TRUE = FALSENOT FALSE = TRUEbut written as:def NOT X =IF XTHEN FALSEELSE TRUEWe will now write:def NOT TRUE = FALSEor NOT FALSE = TRUESimilarly, implication is defined by:IMPLIES TRUE Y = YIMPLIES FALSE Y = TRUEbut written as:def IMPLIES X Y =IF XTHEN YELSE TRUEWe will now write:def IMPLIES TRUE Y = Yor IMPLIES FALSE Y = TRUEFor numbers, we will allow the use of the constant 0 and bound variables qualified by nested SUCCs in place of boundvariables. In general, for:rec =IF ISZERO THEN ELSE we will now write:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!