title: Ocaml: using list.length
body: <p>I am trying to find the length of a list in ocaml.</p>
  
  <p>I call a function first called </p>
  
  <blockquote>
  <pre><code>&gt; let get_list_length e in   
  &gt; print_list_length out x
  </code></pre>
  </blockquote>
  
  <p>the actual code in get_list_length is where I am confused. The "e" is a list of "commands" and I want to find the length of all the "commands".</p>
  
  <blockquote>
    <p>let get_list_length(e:values) : unit =<br>
      match e with<br>
            let x =
           list.length(e);;</p>
  </blockquote>
  
  <p>So my e is the list of "commands" which are a bunch of values specified in my grammar file. I am confused about how to get the length of the list since e is a list of values and I want the length of that list.</p>
  
  <p>Any help would be appreciated.</p>