Problem 7: Label Sum (100 pts)
Using the data abstraction above, write a function that sums up the entries of a tree, assuming that the entries are all numbers.
Hint: You may want to use map
with a helper function to sum list entries.
Note: Do not violate the abstraction barrier!
(define (label-sum t)
'YOUR-CODE-HERE
)
;;; Tests
; scm> (label-sum t1)
; 36