message: docs(scan): add comments
diff: @@ -100,13 +100,30 @@ export function scan<V, A, S>(accumulator: (acc: V | A | S, value: V, index: num
  return (source: Observable<V>) => {
  return lift(source, function (this: Subscriber<any>, source: Observable<V>) {
  const subscriber = this;
  + // Whether or not we have state yet. This will only be
  + // false before the first value arrives if we didn't get
  + // a seed value.
  let hasState = hasSeed;
  - let state: any = hasSeed ? seed! : null!;
  + // The state that we're tracking, starting with the seed,
  + // if there is one, and then updated by the return value
  + // from the accumulator on each emission.
  + let state: any = seed;
  + // An index to pass to the accumulator function.
  let index = 0;
  +
  + // Subscribe to our source. All errors and completions are passed through.
  source.subscribe(
  new OperatorSubscriber(subscriber, (value) => {
  const i = index++;
  - subscriber.next((state = hasState ? accumulator(state, value, i) : ((hasState = true), value)));
  + // Set the state and send it to the consumer.
  + subscriber.next(
  + (state = hasState
  + ? // We already have state, so we can get the new state from the accumulator
  + accumulator(state, value, i)
  + : // We didn't have state yet, a seed value was not provided, so
  + // we set the state to the first value, and mark that we have state now
  + ((hasState = true), value))
  + );
  })
  );
  });
  