@match expression @case pattern @given guard @orcase another pattern @given another guard @then value if matches @endmatch For any types c, t @match c @case c @given Boolean @orcase c @given Boolean @then t @endmatch

Matches against several possible alternatives. For example, @match desc @case "full" @orcase "max" @then 1.0 @case _ @then 0.5 @endmatch checks if desc is equal to "full" or "max". If so, the result is 1.0, otherwise (the case underscore matches anything else) the result is 0.5.

ExamplesClick an example to insert it
@match "B" @case "A" @then true @case "B" @then false @endmatchfalse
@match "Hello There" @case "Bye" @then "Leaving" @case "Hello" ; _ @then "Arriving" @endmatch"Arriving"
@match 32 @case 0 @then "Zero" @case n @given n > 0 @then "Positive" @endmatch"Positive"