| Functional Arguments |
| Last modified on June 4, 2001 by rpj@cs.rit.edu. | ||
| Functional Arguments |
| Procedural parameters | |
| In Scheme, procedures can be passed as parameters to other
procedures. Procedures that have procedural arguments are called higher order. Procedural arguments in higher order procedures can be invoked and/or passed on to other calls. |
| Last modified on June 4, 2001 by rpj@cs.rit.edu. | ||
| Functional Arguments |
| Procedural parameters |
| Example: | |
(define remove-something
(lambda (test-for-the-thing lat)
(cond [(null? lat) '()]
[(test-for-the-thing (car lat))
(remove-something test-for-the-thing (cdr lat))]
[else (cons (car lat)
(remove-something test-for-the-thing (cdr lat)))])))
|
| Last modified on June 4, 2001 by rpj@cs.rit.edu. | ||