read(Goal), call(Goal)
. Also a meta
predicates such as ignore/1
are defined using call:
ignore(Goal) :- call(Goal), !. ignore(_).
Note that a plain variable as a body term acts as call/1 and the above is equivalent to the code below. SWI-Prolog produces the same code for these two progams and listing/1 prints the program above.
ignore(Goal) :- Goal, !. ignore(_).
Note that call/1 restricts the scope of the cut (!/0). A cut inside Goal only affects choice points created by Goal.