Reputation: 2262
How can I use once
in SICStus?
In SWI Prolog, the following works:
test(X, Y, abc) :- once(X == 'true' ; Y == 'true').
but in SICStus Prolog, once
seems to be unrecognized. What is the equivalent of once
in SICStus?
Thank you.
Upvotes: 2
Views: 92
Reputation: 2262
The answer is:
test(X, Y, abc) :- once((X == 'true' ; Y == 'true')).
The additional parenthesis did the trick.
Upvotes: 4