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.

- 219 -λb.b3)i) a) (identity ) => ... =>b) ((apply (apply identity)) ) => ... =>((apply identity) ) => ... =>(identity ) => ... =>ii) a) ((apply ) ) => ... =>( )b) ((λx.λy.(((make_pair x) y) identity) ) ) =>(λy.(((make_pair ) y) identity) ) =>(((make_pair ) ) identity) => ... =>((identity ) ) => ... =>( )iii) a) (identity ) => ... =>b) ((self_apply (self_apply select_second)) ) => ... =>(((self_apply select_second) (self_apply select_second))) => ... =>(((select_second select_second) (select_second select_second))) => ... =>((λsecond.second (select_second select_second) ) => ... =>((select_second select_second) ) => ... =>(λsecond.second ) =>4)def make_triplet = λfirst.λsecond.λthird.λs.(((s first) second) third)def triplet_first = λfirst.λsecond.λthird.firstdef triplet_second = λfirst.λsecond.λthird.seconddef triplet_third = λfirst.λsecond.λthird.thirdmake_triplet triplet_first ==λfirst.λsecond.λthird.λs.(((s first) second) third) triplet_first => ... =>(((triplet_first ) ) ) ==(((λfirst.λsecond.λthird.first ) ) ) => ... =>

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

Saved successfully!

Ooh no, something went wrong!