Stop show with sound -- Keyboard shortcut: 'x'  Next slide in show -- Keyboard shortcut: 'n'  4 minutesHigher-order Functions - slide 23 : 34

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