[archives] [homepage]

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

SICP Exercise 2.21

Here’s square-list made with and without using map.

(define (square-list items)
  (if (null? items)
      nil
      (cons (square (car items))
            (square-list (cdr items)))))

(define (map-square-list items)
  (map square items))