aboutsummaryrefslogtreecommitdiff
path: root/src/content/chapter2_flow_control/lesson11_guards/en.html
blob: 3ea9cc5912e61e1fe5b4883406c34f43c7be003a (plain)
1
2
3
4
5
6
7
8
9
<p>
  The <code>if</code> keyword can be used with case expressions to add a
  <em>guard</em> to a pattern. A guard is an expression that must evaluate to
  <code>True</code> for the pattern to match.
</p>
<p>
  Only a limited set of operators can be used in guards, and functions cannot be
  called at all.
</p>