Lecture overview -- Keyboard shortcut: 'u'  Previous page: Currying in Scheme -- Keyboard shortcut: 'p'  Next page: Ad hoc currying in Scheme (1) -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home    Lecture 4 - Page 23 : 34
Functional Programming in Scheme
Higher-order Functions
Examples of currying

Curried functions are very useful building blocks in the functional paradigm

In particular, curried functions are adequate for mapping and filtering purposes

Expression

Value

(font-1 4 red "Large red text")
Large red text
(define curried-font-1 (curry3 font-1))
(define large-font (curried-font-1 5))
((large-font blue) "Very large blue text")
Very large blue text
(define small-brown-font ((curried-font-1 2) brown))
(small-brown-font "Small brown text")
Small brown text
(define large-green-font ((curried-font-1 5) green))
(list-to-string (map large-green-font (list "The" "End")) " ")
The End

Examples of currying in Scheme.