raulraja
07/24/2017, 7:12 PMval result: Any? = match("1".some())(
case(typeOf<String>() then { (it).toInt() }),
case(typeOf<Option.Some<Int>>() then { it.value + 1 }),
case(typeOf<Option.Some<String>>() then { it.value.toInt() * 10 }),
case(typeOf<Option.Some<Double>>() then { it.value.toInt() }),
case(typeOf<Int>() then { it }),
default = { 0 }
)
result shouldBe 10