Guest User

Untitled

a guest
Feb 20th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. ; Exercise 2.21
  2. (define (square x y) (* x y))
  3.  
  4. (define (square-list-a items)
  5. (if (null? items)
  6. '()
  7. (cons (* (car items) (car items))
  8. (square-list (cdr items)))))
  9.  
  10. (define (square-list-b items)
  11. (map (lambda (x) (* x x)) items))
Add Comment
Please, Sign In to add comment