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),
- ( call(Goal),
- (
- (nb_setarg(1, State, X),
- nb_setarg(2, State, W),
- fail)
- ;
- (arg(1, State, M0),
- X @< M0,
- nb_setarg(1, State, X),
- nb_setarg(2, State, W),
- fail)
- )
- ;
- arg(1, State, Min),
- arg(2, State, Witness),
- nonvar(Min),
- nonvar(Witness)
- ).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement