Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2015
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. agg_all_(min(X,W), Goal, min(Min,Witness)) :-
  2. State = state(X,W,LastMin),
  3. ( call(Goal),
  4. arg(1, State, M0),
  5. M is min(M0,X),
  6. \+compare(=, 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),
  13. arg(2, State, Witness),
  14. nonvar(Min),
  15. nonvar(Witness)
  16. ).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement