Advertisement
logicmoo

Byrd's box never left the ground

Aug 23rd, 2015
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. agg_all_(min(X,W), Goal, min(Min,Witness)) :-
  2. State = state(X,W),
  3. ( call(Goal),
  4. (
  5. (nb_setarg(1, State, X),
  6. nb_setarg(2, State, W),
  7. fail)
  8. ;
  9. (arg(1, State, M0),
  10. X @< M0,
  11. nb_setarg(1, State, X),
  12. nb_setarg(2, State, W),
  13. fail)
  14. )
  15. ;
  16. arg(1, State, Min),
  17. arg(2, State, Witness),
  18. nonvar(Min),
  19. nonvar(Witness)
  20. ).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement