From f0d8ee91d085d906eb5b8a22da938911bfb922f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Tue, 18 Mar 2014 17:27:56 +0000 Subject: [PATCH] fix foldl2 --- library/maplist.yap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/maplist.yap b/library/maplist.yap index c1eab0cfd..31f7031fa 100644 --- a/library/maplist.yap +++ b/library/maplist.yap @@ -340,7 +340,7 @@ foldl2_([H|T], Goal, V0, V, W0, W) :- foldl2(Goal, List1, List2, V0, V, W0, W) :- foldl2_(List1, List2, Goal, V0, V, W0, W). -foldl2_([], [], [], V, V, W, W). +foldl2_([], [], _Goal, V, V, W, W). foldl2_([H1|T1], [H2|T2], Goal, V0, V, W0, W) :- call(Goal, H1, H2, V0, V1, W0, W1), foldl2_(T1, T2, Goal, V1, V, W1, W). @@ -348,7 +348,7 @@ foldl2_([H1|T1], [H2|T2], Goal, V0, V, W0, W) :- foldl2(Goal, List1, List2, List3, V0, V, W0, W) :- foldl2_(List1, List2, List3, Goal, V0, V, W0, W). -foldl2_([], [], [], [], V, V, W, W). +foldl2_([], [], [], _Goal, V, V, W, W). foldl2_([H1|T1], [H2|T2], [H3|T3], Goal, V0, V, W0, W) :- call(Goal, H1, H2, H3, V0, V1, W0, W1), foldl2_(T1, T2, T3, Goal, V1, V, W1, W).