Skip to content

Commit

Permalink
perf(scan): fast-path for scanning scalars
Browse files Browse the repository at this point in the history
  • Loading branch information
benlesh committed Oct 14, 2015
1 parent aca2d37 commit 0201b92
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/observables/ScalarObservable.ts
Original file line number Diff line number Diff line change
@@ -85,4 +85,8 @@ export default class ScalarObservable<T> extends Observable<T> {
return new ScalarObservable(result);
}
}

scan<R>(project: (acc: R, x: T) => R, acc?: R): Observable<R> {
return this.reduce(project, acc);
}
}

0 comments on commit 0201b92

Please sign in to comment.