Pattern matching in Kotlin is nice and the fact it does not execute the next pattern match is good in 90% of use cases.
In Android, when database is updated, we use J
val orders = arrayListOf( { upgradeFromV1()}, { upgradeFromV2()}, { upgradeFromV3()} ) orders.drop(oldVersion).forEach { it() }