Skip to content
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

Merged
merged 2 commits into from
May 14, 2017

Conversation

sea1jxr
Copy link
Contributor

@sea1jxr sea1jxr commented May 10, 2017

I am sure I didn't get this 100% correct, so fire away with your suggestions for improvements :)

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling bec65d4 on sea1jxr:reorder into 1f36786 on Jason3S:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling bec65d4 on sea1jxr:reorder into 1f36786 on Jason3S:master.

@Jason3S
Copy link
Collaborator

Jason3S commented May 10, 2017

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)

  • concat extends a sequence by another sequence (sort of opposite of a filter).
  • concatMap is more of a flattener. The resulting sequence can be longer than the original sequence.

@sea1jxr
Copy link
Contributor Author

sea1jxr commented May 10, 2017

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.

Copy link
Collaborator

@Jason3S Jason3S left a 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.

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>;
Copy link
Collaborator

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

@coveralls
Copy link

coveralls commented May 12, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 83e4825 on sea1jxr:reorder into 1f36786 on Jason3S:master.

@sea1jxr
Copy link
Contributor Author

sea1jxr commented May 12, 2017

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.

@Jason3S
Copy link
Collaborator

Jason3S commented May 14, 2017

Good catch with reduceToSequence

@Jason3S Jason3S merged commit 2ce3b6f into streetsidesoftware:master May 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants