Created
October 6, 2008 08:16
-
-
Save smly/15012 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Exercise 2.21 | |
(define (square x y) (* x y)) | |
(define (square-list-a items) | |
(if (null? items) | |
'() | |
(cons (* (car items) (car items)) | |
(square-list (cdr items))))) | |
(define (square-list-b items) | |
(map (lambda (x) (* x x)) items)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment