Prolog program to find summation of list of numbers.
trace domains l = integer* predicates sum(l) findsum(l,integer) clauses sum(List):- X=0, findsum(List,X). findsum([],X):- write("X::",X). findsum([H|List],X):- XX = X+H, findsum(List,XX).