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