sum([]) = 0 sum(h:t) = h + sum(t)
int sum(const List L) { if(isEmpty(L)) { return 0; } else { return head(L) + sum(tail(L)); } }