corneil
08/02/2019, 10:02 PMDominaezzz
08/02/2019, 10:07 PMfun functionalDecision(worker:Worker?) {
worker?.apply {
doSomeThing()
} ?: println("We have a problem")
}
Dominaezzz
08/02/2019, 10:08 PMtrevjones
08/02/2019, 10:32 PMifApply
due to already having ?.apply
and generally I try to avoid using elvis as a control flow for anything other than a trivial case. ie ?: throw SomeDetailException() // as opposed to just using a !!
corneil
08/02/2019, 11:07 PMtrevjones
08/02/2019, 11:11 PMcorneil
08/03/2019, 8:04 AMrkeazor
08/03/2019, 2:15 PM