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

Add zero-arg flatMapIterable and concatMapIterable #185

Merged
merged 1 commit into from
Jul 12, 2018

Conversation

bemusementpark
Copy link
Contributor

@bemusementpark bemusementpark commented Jun 21, 2018

Implements #186

This introduces a convenient overload of flatMapIterable and concatMapIterable that allows the often-used flatMapIterable { it } to be abbreviated as flatMapIterable() and similarly for concatMapIterable.

This can save a number of classes and methods in an Android application.

Verified

This commit was signed with the committer’s verified signature.
RicePatrick Patrick Rice
Copy link

@gildor gildor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be merged.
This idiom is pretty common in our code, but { it } looks really strange and confusing.

@stepango stepango merged commit 545f913 into ReactiveX:2.x Jul 12, 2018
@gildor
Copy link

gildor commented Jul 12, 2018

This can save a number of classes and methods in an Android application.

I agree with this proposal. but not sure that it can help to save classes/methods, actually methods count will be increased (+2 methods)

@bemusementpark bemusementpark deleted the ag-flatMapIterable branch July 12, 2018 10:57
@bemusementpark
Copy link
Contributor Author

Right. I figure those will be proguarded out if unused and if one of these are used more than once in a project, then we will be saving lambdas. The simplicity is more important.

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