previous | index | next

Processing Lists: Summing Integers

Q: What is the sum of the integers in an empty list?

A: Zero

Q: What is the sum of the integers in a nonempty list?
(Hint: Answer in terms of the head and the tail.)


previous | index | next