cats-mtl
cats-mtl copied to clipboard
Add Handle#allow#attempt
I've started adopting submarine errors, and it would be nice to have a simple way to test an outcome.
The attempt combinator could be rather handy in tests:
for {
r <- Handle.allow(fallible).attempt
} yield assert(r == Left(SomeError)) // r = Either[E, A]