kotlin syntax is so fun & concise… I will neve...
# announcements
p
kotlin syntax is so fun & concise… I will never stop discovering opportunities, eg. mutable list of functions:
Copy code
val actions = mutableListOf<() -> Unit>().apply {
    add { actionA() }
    add { actionB() }
    if (c) add { actionC() }
}
val labels = mutableListOf<String>().apply {
    add("Asdf")
    add("Bfew")
    if (c) add("Cdsa")
}
selector("Show \”${asdf.title}\" in:", labels, { i ->
    actions[i].invoke()
})