---++ Syntax
"if" Strategy "then" Strategy "end" -> Strategy
---++ Description
The strategy
if s1 then s2 end
applies =s2= if =s1= succeeds. The result of =s1= is ignored. That is, if the condition
t
succeeds, then the result of
t
is
t
On the other hand, if the condition fails, then the result is =t=.
---++ Formatting
The if-then construct is usually formatted in the following way:
if s1 then
s2
end
---++ Implementation
The if-then construct is sugar for a guarded left-choice. The strategy
if s1 then s2 end
translates into
where(s1) < s2 + id