Advertisement
logicmoo

Easzars nb_setarg/3

Aug 23rd, 2015
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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),
  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, X),
  13. arg(2, State, W)
  14. ).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement