Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: bb2fd30835
Fetching contributors…

Cannot retrieve contributors at this time

15 lines (11 sloc) 0.363 kb
;;; Exercise 2.31
(define (tree-map proc tree)
(cond ((null? tree) tree)
((not (pair? tree)) (proc tree))
(else (cons (tree-map proc (car tree))
(tree-map proc (cdr tree))))))
(define (square-tree tree)
(tree-map square tree))
(define (blah tree)
(tree-map (lambda (x) (* x x x)) tree))
(blah t1) ;aint that right B-)
Jump to Line
Something went wrong with that request. Please try again.