Skip to content

Instantly share code, notes, and snippets.

@smly
Created October 6, 2008 08:16
Show Gist options
  • Save smly/15012 to your computer and use it in GitHub Desktop.
Save smly/15012 to your computer and use it in GitHub Desktop.
; 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