nickk
05/15/2019, 4:10 PMclass Action(val field1: String, val field2: String, var closure: () -> Unit = {} ) { }
val myAction = Action("value1", "value2")
myAction.closure = {
callAnotherFunction(myAction)
}
collection.add(myAction)
Is there a way to avoid defining the temp variable and do it all at once?