parameterized procedures in Scheme
(define fav-color (make-parameter 'blue))
(define whats-ur-fav-color?
(lambda ()
(fav-color)))
> (whats-ur-fav-color?)
blue
> (parameterize ((fav-color 'red))
(whats-ur-fav-color?))
red
(define fav-color (make-parameter 'blue))
(define whats-ur-fav-color?
(lambda ()
(fav-color)))
> (whats-ur-fav-color?)
blue
> (parameterize ((fav-color 'red))
(whats-ur-fav-color?))
red