Define predicate summy(List, Limit, N), where List is a list of absolute value numbers, and N is the sum of such numbers from List lists whose value is smaller than Limit.
This is what I have: *
abx([],[]).
abx([H|T], [H|T1]):-
H >= 0,!,
abx(T,T1).
abx([M|T], [M1|T1]):-
M < 0,
M1 is M * (-1),
abx(T,T1).
summy([], [], []).
summy([H|T], L, N):-
abx([H|T], [X|Y]),
X < L,
sumlist([X|Y], N).
If I run the example it shows X=26, not X=11.