6 [else (cons (f (first list))
7 (map1 f (rest list)))]))
9 (define (mymap f lists)
11 [(empty? (first lists)) '()]
12 [else (cons (apply f (map1 first lists))
13 (mymap f (map1 rest lists)))]))
19 [(not (pair? coll)) (list coll)]
20 [else (append (fringe (first coll))
21 (fringe (rest coll)))]))
23 (define (scale-tree tree factor)
24 (map (lambda (subtree)
26 (scale-tree subtree factor)
31 (define (square-tree1 tree)
32 (map (lambda (subtree)
34 (square-tree1 subtree)
38 (define (square-tree2 tree)
41 [(not (pair? tree)) (* tree tree)]
42 [else (cons (square-tree2 (car tree))
43 (square-tree2 (cdr tree)))]))
45 (define (fringe1 tree)
46 (map (lambda (subtree)
47 (if (not (pair? subtree))
53 (define (tree-map f tree)
54 (map (lambda (subtree)