In ML, the If construct has several forms permitting the expression of loops.
The basic form is
if <ml> then <ml> else <ml>
which can be inserted in ML mode with the
The variant forms are not essential, but are edited as follows.
If the If form is nested through the Else place, then the "else" particle can be toggled with the
The presence of the "else" particle becomes significant only in order to determine the scope of a loop construct. The basic form can be toggled with loop forms thus:
if <ml> loop <ml> else <ml> if <ml> then <ml> loop <ml> if <ml> loop <ml> loop <ml>
are variants indicating when looping will occur from the branches.
In normal left-to-right mode,