209k views
0 votes
The Lisp function LENGTH counts the number of elements in the top level of a list. Write a function ALL-LENGTH of one argument that counts the number of atoms that occur in a list at all levels. Thus, the following lists will have the following ALL-LENGTHs.

(A B C) => 3
((A (B C) D (E F)) => 6
(NIL NIL (NIL NIL) NIL ) => 5

1 Answer

7 votes

Answer:

bc

Step-by-step explanation:

User Honest Abe
by
4.2k points