title: Recursive function to split list into list
body: <p>I'm trying to solve the following problem, I have a Collection that contain some data:</p>
  
  <pre><code>+-------------+---------------+-------------+
  |     Date    |  InitialValue |  FinalValue |
  +-------------+---------------+-------------+
  |  21.05.2003 | 0             | 382087.14   |
  |  23.06.2003 | 408206.52     | 110622.79   |
  |  19.07.2004 | 123811.34     | 0           |
  |  31.12.2011 | 0             | 0           |
  |  08.06.2012 | 0             | 501854.71   |
  |  31.12.2012 | 501854.71     | 546208.19   |
  |  31.12.2013 | 634535.58     | 666284.47   |
  |  30.06.2014 | 666284.47     | 725837.32   |
  |  08.07.2014 | 725837.32     | 729646.48   |
  +-------------+---------------+-------------+
  </code></pre>
  
  <p>What I need to do is to split this list into multiple lists when the final value is equal to 0. The expected result should be something like this:</p>
  
  <p>Result list 1</p>
  
  <pre><code>+-------------+---------------+-------------+
  |     Date    |  InitialValue |  FinalValue |
  +-------------+---------------+-------------+
  |  21.05.2003 | 0             | 382087.14   |
  |  23.06.2003 | 408206.52     | 110622.79   |
  |  19.07.2004 | 123811.34     | 0           |
  +-------------+---------------+-------------+
  </code></pre>
  
  <p>Result list 2</p>
  
  <pre><code>+-------------+---------------+-------------+
  |     Date    |  InitialValue |  FinalValue |
  +-------------+---------------+-------------+
  |  31.12.2011 |             0 |           0 |
  +-------------+---------------+-------------+
  </code></pre>
  
  <p>Result list 3</p>
  
  <pre><code>+-------------+---------------+-------------+
  |     Date    |  InitialValue |  FinalValue |
  +-------------+---------------+-------------+
  |  08.06.2012 | 0             | 501854.71   |
  |  31.12.2012 | 501854.71     | 546208.19   |
  |  31.12.2013 | 634535.58     | 666284.47   |
  |  30.06.2014 | 666284.47     | 725837.32   |
  |  08.07.2014 | 725837.32     | 729646.48   |
  +-------------+---------------+-------------+
  </code></pre>
  
  <p>Can somebody give me an elegant way to solve my problem?</p>