<< Previous exercise (2.20) | Index | Next exercise (2.22) >>
(define (sq3 items) (map square items)) (sq3 (list 1 2 3 4))
(define nil '()) (define (square-list items) (if (null? items) nil (cons (square (car items)) (square-list (cdr items))))) (define (square-list-m items) (map square items)) (square-list (list 1 2 3 4 5 6 7 8 9 10)) (square-list-m (list 1 2 3 4 5 6 7 8 9 10))
jz