CSC151.02 2003F, Class 37: Higher-Order Procedures Again
Admin:
* Homework: Today's lab
* Exams returned next week
Topics:
* Returning procedures
* Some notes on yesterday's lab
* Fun with Boolean operations
* New Lab
Observation:
* One key aspect of higher-order procedures is that procedures can take other procedures as parameters
* A second is that procedures can *return* newly constructed procedures
* How do you build a new procedure? With a lambda
* Prototypical example, compose
(compose f g) is a function that, when applied to x, gives you (f (g x))
* Particular example
(define strlen (compose length list->string))
* Cool! A function definition with no lambdas.
Lab Lab La Bla Bla Bla b