Lecture 4 - Page 15 : 34
Functional Programming in Scheme
Higher-order Functions
* Introduction to higher-order functions
Higher-order functions
Some simple and general higher-order functions
Linear search in lists
Generation of list selectors
* 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
Examples of currying
Ad hoc currying in Scheme (1)
Ad hoc currying in Scheme (2)
* Web related higher-order functions
HTML mirror generation
HTML mirror usage examples
Making tables with the real mirror
Tables with higher-order functions
HTML element modifications
The function simple-html-table
The XHTML mirror in LAML
Generation of a leq predicate from enumeration
Reduction
Reduction of a list by means of a binary operator transforms the list to a value in the range of the binary operator.
Left and right reduction of a list. Left reduction is - quite naturally - shown to the left, and right reduction to the right.
There is no natural value for reduction of the empty list. Therefore we assume as a precondition that the list is non-empty.