title: How to find inside a list of lists a list with a single element
body: <p>I have been trying to do a function that returns to me the first (or all it might work to but I do prefer just the first), element of a list of lists that is single, i mean:</p>
  
  <pre><code>[[x;y;z];[a;b;c];[a];[b]]
  </code></pre>
  
  <p>In this case I would like to get returned the <code>a</code> or <code>[a]</code> but I cant I tried to do a function something like:</p>
  
  <pre><code>let rec find_unit ll =
  match ll with
  |[x]    -&gt; [x]
  and so on...
  </code></pre>
  
  <p>But every time I try something like this, I get in a recursion that never stops, or the function simple dont return the element. Can someone tell me how to do it properly? I still cant understand a lot of OCaml syntax... Just like in the example I dont know that to put in the line of <code>|[x] -&gt; [x]</code>, particularly the first <code>[x]</code>.</p>
  
  <p>Sorry for the question but I am destroying my code now and I cant find a solution. </p>