function name = mycount
这是输出示例:
(mycount 20) -> error(must standard error)
(mycount `()) -> 0
(mycount `(1 2 3)) - > 6
(mycount `((1 2) ((3)) (4 (5)))) -> 15
答案 0 :(得分:-1)
function count-numbers takes a list:
define a counter
is it a number?
ERROR
is it a list?
for each element of list:
cond
- is it a number? -> increase the counter
- is it a list? -> apply (count-numbers) to it and add the result to counter
- do nothing
那样的东西?我们不会做你的作业:))