Jörg Winter
03/11/2021, 5:01 PMValidated.mapN(Semigroup.nonEmptyList(), ...)
gone in 0.12 snapshot ?simon.vergauwen
03/11/2021, 5:02 PMzip
, but a added bonus is you don't need to specify Semigroup.nonEmptyList()
for ValidatedNel
anymore.
Some context:
Replace mapN with zipJörg Winter
03/11/2021, 5:04 PMsimon.vergauwen
03/12/2021, 7:32 AMmapN
didn't feel right since we have zip
already in the Kotlin Std already, and we also had it for arity-2 in Arrow. So there was actually duplicated behavior between mapN(v1: Validated<E, A>, v2, Validated<E, B>, f: (A, B) -> C)
and Validated<E, A>.zip(b: Validated<E, B>)
. Since we want to stay close to the idiomatic patterns that Kotlin and the Kotlin Std uses we preferred zip
. It's also a popular name for this signature in FP so works out perfectly 😄simon.vergauwen
03/12/2021, 7:33 AM