title: RxJS Observable Recursive Permutation with Expand
body: <p>I have the string <code>CAKES</code>.</p>
  
  <p>I would like every permutation of it (i.e., <code>SKACE</code>, <code>SEKAC,</code>  etc). I've tried doing it with <code>Rx.Observable.prototype.expand</code> but I can't seem to get expand to do a standard permutation algorithm.</p>
  
  <p>How would this be done somewhat as follows?</p>
  
  <pre><code>import Rx from rxjs;
  
  Rx.observable.of('CAKES')
    .expand(...)
    .subscribe(p=&gt;console.log(p))
  
  /* logs every permutation of CAKES = "SKACE", "SEKAC", etc. ... */
  </code></pre>
  
  <p>Reason: Purely academic purposes. I think that expand can't be used this way and would like to see if someone can establish that it can. Maybe someone who reads this will have a real use case.</p>