title: In this F# code how is the firstElem getting a value?
body: <p>In the below F# code how the firstElem getting a value? I got the code from the below this <a href="https://fsharpforfunandprofit.com/posts/fvsc-quicksort/" rel="nofollow noreferrer">link</a>. </p>
  
  <pre><code>let rec quicksort list =
      match list with
          | [] -&gt;                            // If the list is empty
              []                            // return an empty list
          | firstElem::otherElements -&gt;      // If the list is not empty     
              let smallerElements =         // extract the smaller ones    
          otherElements             
          |&gt; List.filter (fun e -&gt; e &lt; firstElem) 
          |&gt; quicksort              // and sort them
      let largerElements =          // extract the large ones
          otherElements 
          |&gt; List.filter (fun e -&gt; e &gt;= firstElem)
          |&gt; quicksort              // and sort them
      // Combine the 3 parts into a new list and return it
      List.concat [smallerElements; [firstElem]; largerElements]
  </code></pre>