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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

- 41 -(((cond false) true) x) ==(((λe1.λe2.λc.((c e1) e2) false) true) x) =>((λe2.λc.((c false) e2) true) x) =>(λc.((c false) true) x) =>((x false) true)so we will use:def not = λx.((x false) true)Let us try:NOT TRUEas:(not true) ==(λx.((x false) true) true) =>((true false) true) ==((λfirst.λsecond.first false) true) =>(λsecond.false true) =>falseand:NOT FALSEas:(not false) ==((λx.((x false) true) false) =>((false false) true) ==((λfirst.λsecond.second false) true) =>(λsecond.second true) =>truewhich correspond <strong>to</strong> the truth table.3.4. ANDAND is a binary opera<strong>to</strong>r of the form:

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

Saved successfully!

Ooh no, something went wrong!