sum([],0). sum([F | R],Answer) :- sum(R,OtherAnswer), Answer is F + OtherAnswer.