Question: language is scheme (25 pts) Write a function (sum-up-numbers-simple L). L is a list, which may contain as elements numbers and non-numbers. The result of

 language is scheme (25 pts) Write a function (sum-up-numbers-simple L). L

language is scheme

(25 pts) Write a function (sum-up-numbers-simple L). L is a list, which may contain as elements numbers and non-numbers. The result of the function is the sum of the numbers not in nested lists in L. If there are no such numbers, the result is zero. For example, the result of (sum-up-numbers-simple '(a b 1 2 c 3 d)) should be 6. Test cases: L Result (100 200) (a b c) (100 a) (a 100) (a 100 b 200 C 300 d) (0) ) ( (100)) (100 (200)) (a 100 b (200) c 300 d) 300 O 100 100 600 0 0 100 400 (25 pts) Write a function (sum-up-numbers-simple L). L is a list, which may contain as elements numbers and non-numbers. The result of the function is the sum of the numbers not in nested lists in L. If there are no such numbers, the result is zero. For example, the result of (sum-up-numbers-simple '(a b 1 2 c 3 d)) should be 6. Test cases: L Result (100 200) (a b c) (100 a) (a 100) (a 100 b 200 C 300 d) (0) ) ( (100)) (100 (200)) (a 100 b (200) c 300 d) 300 O 100 100 600 0 0 100 400

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!