(define L '((a b (b c) ((d))) (e (f)) g))
a
(b c)
c
(( d ))
d
g
f
sum
which computes the sum of all
elements in the list, e.g., (sum '(a (b c) d))
is 3.
Note: It is a good idea to test your answers using Scheme interpretor.
You can store your functions in a file, say, hw3
and then
type (load "hw3")
within Scheme.
(reverse (append La Lb)) = (append (reverse Lb) (reverse La))