Lecture 2 - Page 8 : 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
Exercises
On this page we present an exercise related to recursive processing of lists
Sublists of a list
A variant of number-interval
A variant of string-of-char-list?