rook
03/25/2019, 4:13 PMinfix functions that allows the left side to be implied by the context? For example, in applyDias
03/25/2019, 4:26 PMinfix fun <T: Any> T.test(other: Any) {
} ?Alowaniak
03/25/2019, 4:37 PMrook
03/25/2019, 4:58 PMcho
03/26/2019, 12:35 AMinfix fun String.isSameAs(other: String): Boolean = (this == other).also { println(it) }
"SomeString".apply {
isSameAs("Foo")
isSameAs(this)
}
prints false then true