sicp/2_23.sch

5 lines
106 B
Scheme

(define (for-each f l)
(if (not (null? l))
(begin (f (car l))
(for-each f (cdr l)))))