I have the following code for processing multiple ...
# arrow
t
I have the following code for processing multiple independent Options:
Copy code
Option.applicative().map(option1, option2, { (value1, value2) ->
all options present
})
I cannot find how to handle the case when at least one option is missing though. Can it be done with applicative? Or should another mechanism be used for such a case?
or scratch that. It does not seem to be what I needed
t
if one of them are None, at the end you have None without call the lambda, like a normal map
t
right. I was looking for something more like a
fold
, but over multiple Options with one error/ifEmpty handling for all of them
t
that not possible with applicative (from my knowledge), think that every option you pass could be different types