To better understand recursion : <p>I am making an attempt to learn recursion better so I have been practicing some problems. </p>

<p>A common problem is flatten an list of lists to a single list. For example</p>

<pre><code>[3,4,[1,2]] so the desired result will be [3,4,1,2].
</code></pre>

<p>The way I am approaching the problem is:</p>

<ol>
<li>is 0 element a list - no </li>
<li>is 1 element a list - no </li>
<li><p>is 2 element a
list - yes</p>

<p>call the function again and do tests again</p></li>
</ol>

<p>My base case will be to return if element is not a list.</p>

<p>Is there a better approach to understand recursion better?</p>
