Note that:
!/0 cuts through ,/2, ;/2 and the right hand side of ->/2, i.e. cuts that occur in these positions affect the whole clause and subsequent alternatives. It does NOT cut through call/1, not/1, once/1, the left hand side of ->/2 (the condition), or other meta-calling constructs - such cuts only have a local effect.
Success:
[eclipse]: [user].
or(A -> B, C) :- call(A), !, call(B).
or(_ -> _, C) :- call(C).
user compiled 412 bytes in 0.02 seconds
[eclipse]: or(write(a)->fail, write(k)).
a
no.
[eclipse]: or(fail->fail,write(k)).
k
yes.
[eclipse]: [user].
echo :- repeat, read(X), echo(X), !.
echo(end_of_file).
echo(X) :- writeln(X), fail.
user compiled 404 bytes in 0.02 seconds
yes. % if the cut is left out, backtracking occurs.
[eclipse]: echo.
f(1,2).
f(1,2)
end_of_file.
yes.