Commit cbb987b7 authored by SOLIMAN Sylvain's avatar SOLIMAN Sylvain
Browse files

simpler add_list with maplist

parent 6833c0a1
......@@ -165,11 +165,8 @@ list(List) :-
%
% Add two lists term at term
add_list([],[],[]).
add_list([Head1|Tail1],[Head2|Tail2],[HeadSum|TailSum]) :-
HeadSum is Head1 + Head2,
add_list(Tail1,Tail2,TailSum).
add_list(L1, L2, L12) :-
maplist(plus, L1, L2, L12).
nth0_eqq(0, [Head | _Tail], Result) :-
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment