Next:
call/2-n (not in ISO)
Up:
Control constructs
Previous:
repeat/0
Contents
Index
call/1 and once/1
The call
call(Goal)
treats
Goal
as a subgoal. It is equivalent to
Goal
. The call
once(Goal)
is equivalent to
Goal
, but can only succeed at most once. It is implemented as follows:
once(Goal):-call(Goal),!.
Neng-Fa Zhou 2013-01-25