title: How to reverse a list of lists?
body: <p>I have a <code>[[a]]</code> type and for example it looks like:</p>
  
  <pre><code>[[1,2,3],[1,2],[1],[]]
  </code></pre>
  
  <p>But I want to make a function in Haskell which will make it look like:</p>
  
  <pre><code>[[],[1],[1,2],[1,2,3]]
  </code></pre>
  
  <p>I started with this function, but it does not work for a list with lists in it:</p>
  
  <pre><code>myreverse ::[Integer] -&gt; [Integer]
  myreverse [] = []
  myreverse (h:t)= myappend (myreverse t) [h]
  </code></pre>
  
  <p>(<code>myappend</code> is a local function I have, it appends the list)</p>
  
  <p>So what do I need to change in my code, to get it to work with a list containing other lists?</p>