CS 227 Lecture -*- Outline -*- * Introduction to Chapter 7 Abstracting the structure of procedures. ** Schemes of Programs We have seen a lot of patterns or schemes of programming so far: for example... *** different schemes of recursion Have students list them: recursion over flat lists, non-empty flat lists recursion over trees, non-empty trees simultaneous flat or tree recursion numeric recursion *** Schemes for iteration -- accumulators ** Never write the same thing twice -- Computers are good for eliminating drudgery, doing the same thing over and over. -- So in programming, we would like to write down such schemes of programming once and for all, then use them. Advantage of doing this is that you only have to check it once don't repeat yourself, so easier to do things. Analogy: in English, to describe something complex, give it a name e.g., a waltz, football, love, gravity, ... ** toolmaking programming is capturing patterns of information movement (relations) and making them available to users, this is also what a language designer does, but at a higher level (captures patterns of programs, makes them available easily) -- In this chapter, we see that lambda is a general purpose tool for capturing such schemes, -- That is what lambda does, it captures some computational scheme. i.e. lambda is a general purpose tool maker -- Our goal in this chapter is to learn to capture such schemes, using lambda.