I’m trying to use
ado syntax with
Maybe a values. Something conceptually like this
getExpensiveThing ∷ MonadAff m ⇒ m (Maybe String) getExpensiveThing = ado (mval1 ∷ Maybe String) ← fetchLocalStorage (mval2 ∷ Maybe String) ← fetchNetwork (mval3 ∷ Maybe String) ← generateNewBigThingLocally in mval1 <|> mval2 <|> mval3
In this case all effects (in this case kind of expensive) are ran and then the alternatives are alt’d. This isn’t what I want, and what I think I want is
parTraverse but I don’t quite understand how it works in this setup.