jlleitschuh
01/08/2019, 7:12 PMval value = when(x) {
is Either.Left -> when (x.a){
is NumberFormatException -> "Not a number!"
is IllegalArgumentException -> "Can't take reciprocal of 0!"
else -> "Unknown error"
}
is Either.Right -> "Got reciprocal: ${x.b}"
}