University of Washington • CSE583 • D. Notkin © 2000
48
Returning functions from functions
lFunctions are first-class (i.e., just like any other entity in Scheme)
–So we can pass them to functions
–Return them from functions
–Store them in data structures
l(define (compose f g)
  (lambda (x) (f (g x))))
(define double-square
  (compose double square))