We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
any interest in this?
// a partitionE for Nel implicit class PartitionE[E](trav: NonEmptyList[E]) { @SuppressWarnings(Array("org.wartremover.warts.Throw")) def partitionE[A, B]( f: E => Either[A, B] ): (Ior[NonEmptyList[A], NonEmptyList[B]]) = { val (lefts, rights) = trav.toList.map(f).partition(_.isLeft) Ior .fromOptions( Nel(lefts.collect { case Left(left) => left }), Nel(rights.collect { case Right(right) => right }) ) .getOrElse { throw new IllegalStateException("impossible") } } }
The text was updated successfully, but these errors were encountered:
Love it, 👍
Sorry, something went wrong.
Why was this closed? I still think this is a valuable addition 🤔
I don't have plans to contribute it.
No branches or pull requests
any interest in this?
The text was updated successfully, but these errors were encountered: