Its basic syntax is as follows:
The 3 syntactic variants of the match statement are equivalent in meaning. A match statement takes a list of match objects and a set of pattern matching rules. The first rule that matches the pattern completely will be executed. Notice that guards can be placed on each rule, and a rule is only applicable if the guards evaluate to true.