3 ms·
Scala has some nice containers around this with Either, Try, and Future. We’ve also made some custom hybrids like FutureEither. And then with basic for-comprehe
by therealdrag0 5y ago
Scala has some nice containers around this with Either, Try, and Future. We’ve also made some custom hybrids like FutureEither. And then with basic for-comprehensions/maps you can chain together logic and if something fails it’ll return an either with a Left containing an error response, otherwise it’ll implicitly keep going with Right artifacts.