Hi, is ```Validated.mapN(Semigroup.nonEmptyList(),...
# arrow
j
Hi, is
Copy code
Validated.mapN(Semigroup.nonEmptyList(), ...)
gone in 0.12 snapshot ?
s
Yes 😅 We changed it to
zip
, but a added bonus is you don't need to specify
Semigroup.nonEmptyList()
for
ValidatedNel
anymore. Some context: Replace mapN with zip
👍 1
🙌 2
j
must follow the PRs more closely 😄
s
Hehe 😅 This is one of the last big changes expected here.
mapN
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 😄
And always feel free to ask any questions in this channel. I'm always more than happy to help. I'm also working on a migration guide from 0.11.0 to 0.12.0/0.13.0 😉