Join Slack
Powered by
if B doesn’t depend on A then use `applicative().m...
# arrow
p
pakoito
06/02/2019, 1:58 AM
if B doesn’t depend on A then use
applicative().map(val1, val2, val3) { a, b, c -> SomeClass(a, b, c) }
s
sam
06/02/2019, 2:16 AM
If I have two eithers, and I want to map on them if they are both Right, how do I do that using applicative() ?
s
stojan
06/02/2019, 9:01 AM
The map is executed only when both values are right
stojan
06/02/2019, 9:02 AM
You might wanna check out
https://arrow-kt.io/docs/patterns/error_handling/
4
Views
Open in Slack
Previous
Next