Why doesn't this list comprehension in haskell include lists of size < n
<p>I am looking at this code for generating combinations in Haskell</p>

<pre><code>combinations :: Int -&gt; [a] -&gt; [[a]]
combinations 0 _ = [[]]
combinations n xs = [ xs !! i : x | i &lt;- [0..(length xs)-1] 
                                  , x &lt;- combinations (n-1) (drop (i+1) xs) ]
</code></pre>

<p>I tried to visualize how the tree gets expanded, but I do not understand why the list doesn't include the paths in red.</p>

<p><a href="https://i.stack.imgur.com/QnOkj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QnOkj.png" alt="enter image description here"></a></p>

<pre><code>combinations 3 "abcd"
["abc","abd","acd","bcd"]
</code></pre>

<p>All I can see is <code>xs !! i : x</code> ie append the i'th element to the n  -1 combinations of it's tail, but why doesn't <code>[d] : [[]] = [d]</code> get included.</p>