Code Review

Compare your solutions

    #| BEGIN (Write your solution here) |#
(define (tree-map proc tree)
  (map (lambda (sub-tree)
         (if (pair? sub-tree)
             (tree-map proc sub-tree)
             (proc sub-tree)))
       tree))
#| END |#