https://kotlinlang.org logo
#arrow-contributors
Title
# arrow-contributors
s

simon.vergauwen

03/04/2023, 8:45 AM
Hey all, I proposed some new changes for the flattening of
Validated
. There is a series of PRs currently open, and I am looking for feedback. The mapOrAccumulate PR allows binding both
Either<E, A>
and
EitherNel<E, A>
in a single
orAccumulate
DSL. The following introduces the same to all other
orAccumulate
signatures and also removes a lot of code duplication, but also making a small breaking change in the alphas. Specifically here for Either.zipOrAccumulate, the code is now derived from the optimised Raise.zipOrAccumulate. But it works over lambdas instead of values, I also proposed parZipOrAccumulate which matches
parMapOrAccumulate
but for independent operations. The proposed
Either.zipOrAccumulate
now matches the also proposed
parZipOrAccumulate
.
Iterable.mapOrAccumulate
and
NonEmptyList.mapOrAccumulate
are now also derived from the now more optimised
Raise.mapOrAccumulate
. The biggest downside of it all is that without context receivers you need to more often specify type arguments 😞 but their is a very graceful migration from the current encoding to context receivers. You can find a lot more details in the PRs, but feel free to ask and questions or doubts in the PRs themselves ☺️
❤️ 4
3 Views