%% Basic predicates (do not worry about the definitions at this stage):
%% Backtrack (go back and take the next choice):
backtrack :- fail.
%% Carry on after backtracking:
perform(X) :- call(X),!,fail.
perform(_).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%