Hullaballoonatic
04/17/2019, 7:58 PMlist.any it.hasFooCody Engel
04/17/2019, 7:59 PMinfix already allow for that?Hullaballoonatic
04/17/2019, 8:01 PMbdawg.io
04/17/2019, 9:47 PMinfix fun A.apply(configure: A.() -> Unit): A {
configure()
return this
}
A() apply { doSomething() } vs fun A.apply(configure: A.() -> Unit): A {
configure()
return this
}
A().apply { doSomething() }bdawg.io
04/17/2019, 9:48 PMif statements in that they should be avoided and have brackets unless it’s used as an expression ie, val a = if (b) "was true" else "was false"bdawg.io
04/17/2019, 9:52 PMit.hasFoo is a bit ambiguous though and would probably be better expressed as list.any(T::hasFoo) instead of adopting a no-bracket lambda expression