-
Notifications
You must be signed in to change notification settings - Fork 437
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
NonEmptySet: change 2nd param of constructor to Iterable
. OptimizenonEmptySetOf
and toNonEmptySetOrNull
#3389
Conversation
…e` (instead of Set). Avoid unnecessary copying in `nonEmptySetOf` and `toNonEmptySetOrNull`
I am not really sure what is the optimization here. How are you ensuring that elements are not duplicated when using Furthermore, note that we are soon going to make |
In constructor, we have used |
|
…mptyset-optimize # Conflicts: # arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/NonEmptySet.kt # arrow-libs/optics/arrow-optics-ksp-plugin/src/main/kotlin/arrow/optics/plugin/internals/processor.kt
arrow-libs/optics/arrow-optics-ksp-plugin/src/main/kotlin/arrow/optics/plugin/internals/info.kt
Outdated
Show resolved
Hide resolved
I have changed the target branch to |
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.
These generalizations look quite useful. Thanks for the contribution!
arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/NonEmptySet.kt
Outdated
Show resolved
Hide resolved
arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/NonEmptySet.kt
Outdated
Show resolved
Hide resolved
…nEmptySet.kt Co-authored-by: Alejandro Serrano <trupill@gmail.com>
@hoc081098 sorry for the unnecesary noise but, would it be possible for you to rebase these changes into the new |
Iterable
(instead ofSet
).nonEmptySetOf
andtoNonEmptySetOrNull
.