-
Notifications
You must be signed in to change notification settings - Fork 451
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
CU-f34dk7 remove old mapN and expose new APIs #2292
Conversation
This is a hammer to perf, all the nested flatMaps create a new list even when zipping just 2. I'd specialise every implementation. |
i.flatMap { ii -> | ||
j.flatMap { jj -> | ||
k.map { kk -> | ||
map(bb, cc, dd, ee, ff, gg, hh, ii, jj, kk) |
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.
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.
Thanks @nomisRev !
mapN( | ||
b, | ||
c, | ||
sequenceOf(Unit), |
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.
Does sequence(Unit)
allocate new sequences or is it backed by a singleton value? If not we could optimize this.
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.
It's probably not backed by a singleton value.
@pakoito For all data types or just |
Just |
Second, and last, step of the deprecation/removacl top-level
mapN
for nullable. So now we can expose top-levelmapN
APIs for Kotlin Std types that don't have acompanion object
to exposemapN
upon.