View difference between Paste ID: 5UeSERqu and 9nRKwXcB
SHOW: | | - or go back to the newest paste.
1-
agg_all_(min(X,W), Goal, min(Min,Witness)) :-
1+
agg_all_(min(X,W), Goal, min(X,W)) :-
2
  State = state(X,W,LastMin),
3
  (  call(Goal),
4
     arg(1, State, M0),
5-
     M is min(M0,X),
5+
      M is min(M0,X),
6-
     \+compare(=, M, LastMin),
6+
      M \== LastMin,
7
     nb_setarg(1, State, M),
8
     nb_setarg(2, State, W),
9
     nb_setarg(3, State, M),
10
     fail
11
  ;
12-
     arg(1, State, Min),
12+
     arg(1, State, X),
13-
     arg(2, State, Witness),
13+
     arg(2, State, W)
14-
     nonvar(Min),
14+