General
Material
Lecture 1
Lecture 2
Lecture 3
Lecture 4
Lecture 5

Solution

sum(0) --> [].
sum(S) --> [N], sum(Rest), {S is N + Rest}.
    

Back to the exercise.