Implement 'when' transformations (flatten, introduce subject, eliminate subject)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
when (n) {
|
||||
1 -> {
|
||||
res = "one"
|
||||
}
|
||||
2 -> {
|
||||
res = "two"
|
||||
}
|
||||
3 -> {
|
||||
res = "three"
|
||||
}
|
||||
4 -> {
|
||||
res = "four"
|
||||
}
|
||||
else -> {
|
||||
res = "???"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user