title: How to flatten a list without recursion ocaml?
body: <p>How would I flatten a list of lists of integers into a single list of integers in ocaml?  The function would work as shown below.</p>
  
  <pre><code>[[1;2];[3;4;5];[];[6]] -&gt; [1;2;3;4;5;6]
  </code></pre>
  
  <p>As this is homework, it must be done using only fold_left or fold_right, and cannot use the '@' operator, and cannot use recursion.  I get that the accumulator is going to be the members of the new list, but I have no clue how to actually move the elements of the original list to the accumulator.  Any hints would be appreciated.</p>