title: Pattern matching a variable in OCaml?
body: <p>If I do</p>
  
  <pre><code>let check n = function
    | n -&gt; true
    | _ -&gt; false
  </code></pre>
  
  <p>then I get <code>Warning 11: this match case is unused.</code></p>
  
  <p><strong>I understand why</strong>, since the <code>n</code> in <strong>| n -> true</strong> is actually not the argument of <code>check</code>. It is basically a variable created by the pattern matching.</p>
  
  <p><strong>My question is</strong>, in this case, do we have any way to still using pattern matching (instead of if else) to force this check? </p>
  
  <p>I.e., I want to pattern match with the argument <code>n</code>.</p>