If -> Then; _Else :- If, !, Then. If -> _Then; Else :- !, Else. If -> Then :- If, !, Then.
Please note that (If
-> Then) acts as (If
fail), making the construct fail if the condition fails.
This unusual semantics is part of the ISO and all de-facto Prolog
Please note that (if
->then;else) is read as ((if
and that the combined semantics of this syntactic construct as
defined above is different from the simple nesting of the two
individual constructs, i.e., the semantics of
when embedded in ;/2. See