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.

- 220 -make_triplet triplet_first ==λfirst.λsecond.λthird.λs.(((s first) second) third) triplet_second => ... =>(((triplet_second ) ) ) ==(((λfirst.λsecond.λthird.second ) ) ) => ... =>make_triplet triplet_third ==λfirst.λsecond.λthird.λs.(((s first) second) third) triplet_third => ... =>(((triplet_third ) ) ) ==(((λfirst.λsecond.λthird.third ) ) ) => ... =>5)i) λx.λy.(λx.y λy.x)x bound at {x} in λx.λy.(λx.y λy.{x})x free at {x} in λy.(λx.y λy.{x})(λx.y λy.{x})λy.{x}{x}y bound at {y} in λx.λy.(λx.{y} λy.x)λy.(λx.{y} λy.x)y free at {y} in (λx.{y} λy.x)λx.{y}{y}ii) λx.(x (λy.(λx.x y) x))x bound at {x} in λx.({x} (λy.(λx.x y) {x}))x free at {x} in ({x} (λy.(λx.x y) {x}))in {x}in λy.(λx.x y) {x})in {x}x bound at {x} in λy.(λx.{x} y)(λx.{x} y)λx.{x}x free at {x} in {x}y bound at {y} in λx.(x (λy.(λx.x {y}) x))(x (λy.(λx.x {y}) x))(λy.(λx.x {y}) x)λy.(λx.x {y})y free at {y} in (λx.x {y}){y}iii) λa.(λb.a λb.(λa.a b))a bound at {a} in λa.(λb.{a} λb.(λa.a b))a free at {a} in (λb.{a} λb.(λa.a b))λb.{a}{a}a bound at {a} in λa.(λb.a λb.(λa.{a} b))(λb.a λb.(λa.{a} b))

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

Saved successfully!

Ooh no, something went wrong!