-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style(reduce): change signatures and parameter name
The second parameter of reduce isn't the accumulator, but the seed. This commit change `acc` name to `seed`, use a shorthand for parameter properties and fix some signature types.
- Loading branch information
1 parent
7d869e9
commit e96d810
Showing
5 changed files
with
14 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import Observable from '../Observable'; | ||
import { ReduceOperator } from './reduce-support'; | ||
|
||
export default function reduce<T, R>(project: (acc: R, x: T) => R, acc?: R): Observable<R> { | ||
return this.lift(new ReduceOperator(project, acc)); | ||
export default function reduce<T, R>(project: (acc: R, x: T) => R, seed?: R): Observable<R> { | ||
return this.lift(new ReduceOperator(project, seed)); | ||
} |