  /**
   *  Converts an array to an observable sequence, using an optional scheduler to enumerate the array.
   * @deprecated use Observable.from or Observable.of
   * @param {Scheduler} [scheduler] Scheduler to run the enumeration of the input sequence on.
   * @returns {Observable} The observable sequence whose elements are pulled from the given enumerable sequence.
   */
  var observableFromArray = Observable.fromArray = function (array, scheduler) {
    var len = array.length;
    isScheduler(scheduler) || (scheduler = currentThreadScheduler);
    return new AnonymousObservable(function (observer) {
      return scheduler.scheduleRecursiveWithState(0, function (i, self) {
        if (i < len) {
          observer.onNext(array[i]);
          self(i + 1);
        } else {
          observer.onCompleted();
        }
      });
    });
  };
