Toma Radu-Petrescu
Toma Radu-Petrescu

Reputation: 2262

Once in SICStus Prolog?

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

Answers (1)

Toma Radu-Petrescu
Toma Radu-Petrescu

Reputation: 2262

The answer is:

test(X, Y, abc) :- once((X == 'true' ; Y == 'true')).

The additional parenthesis did the trick.

Upvotes: 4

Related Questions