https://kotlinlang.org logo
#announcements
Title
# announcements
r

Ruckus

06/15/2017, 8:20 PM
If you're going to be doing that kind of stuff, you may just want to not use an argument:
Copy code
val name = item.name
when {
    name == "john" -> { ... }
    name.startsWith("Mary") -> { ... }
    name.contains("Fred") -> { ... }
}
👍 3
j

juliocbcotta

06/15/2017, 10:50 PM
ruckustboom: thanks