As in the title, for example
test(X) :-
( was_cut -> X = yep
; X = nope
).
test(X) :-
!,
( was_cut -> X = yep
; X = nope
).
test(X) :-
X = none.
Would yield
?- test(X)
X = nope;
X = yep.
Asking certainly about SWI and/or SICSTUS implementations, but the other ones are welcome as well