Try using an accumulator to keep track of the sum so far.
add(Lst,Sum) :- add(Lst,Sum,0).
add([],Sum,Sum).
add([X|Xs],Sum,Acc) :- NewAcc is Sum+Acc,
add(Xs,Sum,NewAcc).
I haven't tested it, but this should do the trick. The add/2 rule sets the accumulating helper to...