output unification should go after cut.

This commit is contained in:
Vitor Santos Costa 2010-03-15 14:18:25 +00:00
parent 8b6b9e9ac3
commit 9cce7df45b
1 changed files with 2 additions and 1 deletions

View File

@ -122,7 +122,8 @@ bagof(Template, Generator, Bag) :-
% The fourth gives the free variables being currently used.
% The fifth outputs the current solution.
%
'$decide'([], Bag, Key, Key, Bag) :- !.
'$decide'([], Bag, Key0, Key, Bag) :- !,
Key0=Key.
'$decide'(_, Bag, Key, Key, Bag).
'$decide'(Bags, _, _, Key, Bag) :-
'$pick'(Bags, Key, Bag).