Lecture 2 - Page 1 : 35
Programming Paradigms
Recursion and Higher-order Functions
* Recursion and Iteration
Recursion
Recursion versus iteration
Tail Calls
Example of recursion:
number-interval
Examples of recursion: string-merge
Examples with recursion:
string-of-char-list?
Exercises
* Recursion without define and letrec
The Challenge
Development of the Y-combinator
* Introduction to higher-order functions
Higher-order functions
Some simple and general higher-order functions
Linear search in lists
Generation of list selectors
Apply
* Mapping and Filtering
Classical higher-order functions: Overview
Mapping
The mapping function
Examples of mapping
Filtering
The filtering function
Examples of filtering
* Reduction and Zipping
Reduction
The reduction functions
Accumulation
Zipping
The zipping function
* Currying
The idea of currying
Currying in Scheme
More Exercises
Recursion and Iteration
The forms discussed.