Hullaballoonatic
06/02/2019, 5:43 PMfun foo() = true
be referenced as such:
val bar: () -> Boolean = foo
?
or conversely:
interface Foo {
val bar: () -> Boolean
}
object Bar : Foo {
override fun bar() = true // nope. why not?
override val bar = { true } // yep
}
Dias
06/02/2019, 5:49 PM( )->Boolean
is function that returns boolean while true
IS booleanAdam Powell
06/02/2019, 5:51 PMHullaballoonatic
06/02/2019, 5:52 PMAdam Powell
06/02/2019, 5:58 PMAdam Powell
06/02/2019, 5:59 PMAdam Powell
06/02/2019, 6:01 PM::
if you need oneHullaballoonatic
06/02/2019, 6:01 PMAdam Powell
06/02/2019, 6:03 PMfoo::bar != foo::bar
- they're different instancesAdam Powell
06/02/2019, 6:03 PMcollectionOfFunctionReferences.remove(foo::bar)