once(Goal) :- call(Goal), !.
can in many cases be replaced with ->/2.
The only difference is how the cut behaves (see !/0).
The following two clauses below are identical. Be careful about the
library defines an inline expansion of once/1,
mapping it to
(Goal->true;fail). Using the full
if-then-else constructs prevents its semantics from being changed when
embedded in a ;/2
1) a :- once((b, c)), d. 2) a :- b, c -> d.