If you're going to be doing that kind of stuff, yo...
# announcements
r
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
ruckustboom: thanks