You can combine `Applicative.map`. Below is an exa...
# arrow
s
You can combine
Applicative.map
. Below is an example of combining 4 values by only using map with 2 params. Hope that helps :)
Copy code
Validated.applicative().map(
  Validated.applicative().map(a, b, ::Tuple2),
  Validated.applicative().map(c, d, ::Tuple2) 
) { (a, b), (c, d=) -> ... }
arrow 5
☝🏼 4
j
Excellent, thank you a lot! Knew that there had to be some way to do it but being quite new to FP it's sometimes difficult to figure stuff out 🙂
What's the purpose of
::Tuple2
?
s
It's just to create an intermediate result to carry the data to the outer
map
.
r
can also use Applicative.tupled