Function template for simple input types

If all the parameters to the function are of simple types (e.g. numbers, symbols, etc.) then the template most likely consists simply of the names of all the parameters, separated by ellipses ("...") to remind you that they still need to be combined together somehow. For example, in the area-of-ring function, since I've chosen to name the parameters inner and outer, those names are likely to appear in the body:

(define (area-of-ring inner outer)
Note that I've written the parameters in an arbitrary order, and that when the rest of the body is filled in they might actually appear in a different order, or they might be repeated, or some of them might not be needed at all. For example, area-of-ring's full definition is probably
(define (area-of-ring inner outer)
   (- (area-of-disk outer) (area-of-disk inner)))

Last modified: Thu Nov 4 13:20:06 EST 1999
Stephen Bloch /