blob: c8660266463984e54b2b5760a1f8efd7c14f6482 (
plain) (
tree)
|
|
class Catch[+T] {
def either[U >: T](body: => U): Either[Throwable, U] = ???
}
object Test {
implicit class RichCatch[T](val c: Catch[T]) extends AnyVal {
def validation[U >: T](u: => U): Either[Throwable, U] = c.either(u)
}
}
|