Question: I need help using PuTTY. Write a Lisp function that goes through a list and calculates the sum of the even numbers in the list

I need help using PuTTY.
Write a Lisp function that goes through a list and calculates the sum of the even numbers in the list no matter how deep they are in the list. So, it needs to do this recursively.
Examples:
(sum-even '(139112355)) should return 0
(sum-even '(281561214133)) should return 42
(sum-even '(1234(56(278)(122310)1)23(124))) should return 52.

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 Programming Questions!