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

Introducing .flatMapN(f) as a shorthand for .mapN(f).flatten #4003

Closed
domaspoliakas opened this issue Oct 1, 2021 · 2 comments · Fixed by #4009
Closed

Introducing .flatMapN(f) as a shorthand for .mapN(f).flatten #4003

domaspoliakas opened this issue Oct 1, 2021 · 2 comments · Fixed by #4009

Comments

@domaspoliakas
Copy link
Contributor

Hello 👋 this follows from my question on discord and is basically the title.

I find myself doing .mapN(f).flatten very frequently and I think it'd be nice to have a .flatMapN for this scenario.

I am told this was rejected in the past, but I could not find a past issue for this and so I was hoping I could reopen a discussion.

Thanks!

@joroKr21
Copy link
Member

joroKr21 commented Oct 1, 2021

I've thought about this too. The only potential issue I see is the cost in terms of increased Jar size (because that would add not 1 but 22 extra methods). However I'm not sure that's really a concern because #3871 didn't generate much interest.

@domaspoliakas
Copy link
Contributor Author

Given that there were no nays yet, I shall get started on making this. Is that alright?

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 a pull request may close this issue.

2 participants