-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only reordering and grouping of methods in the interface, object and file. #5
Conversation
1 similar comment
Some of them are not easy to sort into categories. These are really about extending the length of a sequence: (I'm not sure what to call them)
|
Yeah, I struggled with concat and concatMap for far too long, so I finally just put them "anywhere" and was hoping you had a good category for them. I kind of think of concat as a SET operation (much like union), but I can't really find any evidence that fits in that category. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you move concat
and concatMap
into their own category: Extenders?
Then I think this is good to go.
src/GenSequence.ts
Outdated
reduceToSequence<U>(fnReduce: (previousValue: GenIterable<U>, currentValue: T, currentIndex: number) => GenIterable<U>, initialValue: GenIterable<U>): Sequence<U>; | ||
scan(fnReduce: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): Sequence<T>; | ||
scan<U>(fnReduce: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): Sequence<U>; | ||
combine<U, V>(fn: (t: T, u?: U) => V, j: Iterable<U>): Sequence<V>; | ||
concat(j: Iterable<T>): Sequence<T>; | ||
concatMap<U>(fn: (t: T) => Iterable<U>): Sequence<U>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's put concat
and concatMap
into their own category: Extenders
I noticed that reduceToSequence wasn't in the readme, so I added it. Please take a close look at the wording there and see if you want any changes. |
Good catch with reduceToSequence |
I am sure I didn't get this 100% correct, so fire away with your suggestions for improvements :)