aboutsummaryrefslogtreecommitdiff
path: root/src/content/chapter2_flow_control/lesson08_multiple_subjects/text.html
blob: 26a7ea38e513d2f0ab804cb4febf8c98b9d26175 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
<p>
  Sometimes it is useful to pattern match on multiple values at the same time in
  one case experession.
</p>
<p>
  To do this you can give multiple subjects and multiple patterns, separated
  commas.
</p>
<p>
  When matching on multiple subjects there must be the same number of patterns
  as there are subjects. Try removing one of the <code>_,</code> sub-patterns to
  see the compile time error that is returned.
</p>