if / then / else can be obtained with (->) / 2 and (;) / 2:
( If -> Then ; Else )
This is sometimes useful. In general, though (when the condition contains variables), this will make your programs unreasonable and incomplete. Whenever you can describe conditions with pattern matching, use pattern matching instead. Then you can not only check, but also generate solutions.
source share