title: Reverse list using map/reduce
body: <p>I am learning concepts of functional programming and trying out problem exercises.
  An exercise, 
  Reverse a list using map/reduce.
  My solution: </p>
  
  <pre><code>lists = [ 1, 2, 3, 5 ,6]
  
  def tree_reverse(lists):
      return reduce(lambda a, x: a + [a.insert(0,x)], lists, [])
  
  print tree_reverse(lists)
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>[6, 5, 3, 2, 1, None, None, None, None, None]
  </code></pre>
  
  <p>I don't understand why there are Nones equal to number of elements in list. </p>
  
  <p>EDIT: Extending question for case of nested lists.</p>
  
  <pre><code> lists = [ 1 ,2 ,3 , [5,6,7], 8, [9, 0, 1 ,4 ]]
  </code></pre>