📅  最后修改于: 2022-03-11 14:48:34.083000             🧑  作者: Mango
domains
x = integer
l = integer*
predicates
sum(l,x)
clauses
sum([],0).
sum([X|List],Sum) :-
sum(List,Sum1),
Sum = X + Sum1.