title: How to create Observable from function?
body: <p>I want to call a function (synchronously) and then use its return value as an initial emission (subsequently chaining some other operators on the resulting observable).</p>
  <p>I want to invoke this function during subscription, so I can't just use <code>Observable.of(() =&gt; getSomeValue())</code>. I've seen <code>bindCallback</code> (previously <code>fromCallback</code>) but I don't think it can be used for this task (correct me if I'm wrong). I've seen <code>start</code> static operator in v4 docs but apparently it is not implemented in v5 (and no indication that its on the way). RxJava also has <code>fromCallable</code> operator that does exactly that afaik.</p>
  <p>Only way I could think of is like this:</p>
  <pre><code>Observable.create((observer: Observer&lt;void&gt;) =&gt; {
    let val = getSomeValue();
    observer.next(val);
    observer.complete();
  })
  </code></pre>
  <p>which I think does just that. But this just seems so complicated for a simple thing that should probably have been like <code>Observable.fromFunction(() =&gt; getSomeValue())</code> And what if I want to run it asynchronously, like <code>start</code> operator does? How can I do this in the current version of RxJS?</p>