Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- agg_all_(min(X,W), Goal, min(X,W)) :-
- State = state(X,W,LastMin),
- ( call(Goal),
- arg(1, State, M0),
- M is min(M0,X),
- M \== LastMin,
- nb_setarg(1, State, M),
- nb_setarg(2, State, W),
- nb_setarg(3, State, M),
- fail
- ;
- arg(1, State, X),
- arg(2, State, W)
- ).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement