title: List option to list in OCaml
body: <p>I have a function that returns a (char list) list option, and I'm trying to get the size of the list:</p>
  
  <pre><code>let c = recherche m ledico in
    match c with
      | None -&gt; Printf.printf "Non."
      | Some [] -&gt; Printf.printf "Oui."
      | _ -&gt;
        let n = List.length c in
  (...)
  </code></pre>
  
  <p><code>recherche</code> is the function that returns me the <code>(char list) list option</code>, and it can return either <code>None</code>, <code>Some []</code>, or <code>Some [[...] ; ... ; [...]]</code>. How do I find this length? I saw <a href="https://stackoverflow.com/questions/21674947/ocaml-deoptionalize-a-list-is-there-a-simpler-way">this</a> solution but it didn't work:</p>
  
  <pre><code>Error: The function applied to this argument has type 'a list -&gt; 'a list
  This argument cannot be applied with label ~f
  </code></pre>
  
  <p>How do I get the size of a list option?</p>