Advertisement
logicmoo

Untitled

May 28th, 2015
442
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  foo(X):- R is random(3)+1, arg(R,v(bar,baz,boo),X).
  2.  
  3.  
  4. ?- forall(between(1,1000,_),
  5.       (foo(X),flag(X,V,V+1))),
  6.   flag(bar,BAR,0), flag(baz,BAZ,0), flag(boo,BOO,0).
  7.  
  8.  
  9. % cumulative version
  10.  
  11. ?- forall(between(1,1000,_),
  12.       (foo(X),flag(X,V,V+1))),
  13.   flag(bar,BAR,BAR), flag(baz,BAZ,BAZ), flag(boo,BOO,BOO).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement