Mazhar Ibna Zahur
Ties
fun foo(bar : Boolean) : Either<Exception, String> { return if(bar) { Either.left(new RuntimeException()) } else { Either.right("correct") } }
fun foo(bar : Boolean) : Either<Exception, String> { return Either.catch { if(bar) { throw new RuntimeException() } else { "correct" } } }
A modern programming language that makes developers happier.