Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```scala
- implicit class TryWithForNot[T](t: Try[T]) {
- def fornot[A](f: Throwable => A): Unit = ???
- }
- implicit class SuccessWithForNot[T](success: Success[T]) {
- def fornot[A](f: Throwable => A): Unit = ()
- }
- implicit class FailureWithForNot[T](failure: Failure[T]) {
- def fornot[A](f: Throwable => A): Unit = {
- f(failure.exception)
- ()
- }
- }
- ```
Add Comment
Please, Sign In to add comment