[archives] [homepage]

Problem 2.23
Friday, August 23, 2019; ago; Download .md

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)))))