SICP Exercise 2.23
An easy question except I don’t know how to handle the final void returned.
(define (for-each f items)
(if (not (null? items))
((f (car items))
(for-each f (cdr items)))))
An easy question except I don’t know how to handle the final void returned.
(define (for-each f items)
(if (not (null? items))
((f (car items))
(for-each f (cdr items)))))