title: All subsequences from a single string
body: <p>How do you extract every possible substring from a single string? 
  I have come up with a kind of cumbersome way and want to find a simpler one.</p>
  
  <pre><code>subStrings :: String -&gt; [String]
  subStrings xs = xs : takeEl xs
  
  takeEl :: String -&gt; [String]
  takeEl xs = nub (concat [y : (takeEl y) | y &lt;- takeEl'])
    where 
      takeEl' = [del y xs | y &lt;- [0..(length xs - 1)]]
  
  del :: Int -&gt; [a] -&gt; [a]
  del k xs = take k xs ++ drop (k+1) xs
  </code></pre>
  
  <p>I would like to explain a little further with an example:
  if I use the function on  "abc", I want it to create a list including the elements below, with no permutations (if "ab" is there "ba" is not necessary).</p>
  
  <pre><code>`["abc", "a","b","c","ab","ac","bc",""]`
  </code></pre>
  
  <p>So concat inits . tails will not be enough since it won't give me "ac".</p>