rook
infix
apply
Dias
infix fun <T: Any> T.test(other: Any) { }
Ruckus
infix fun String.test(other: String) { ... } "A".apply { test "B" }
Alowaniak
cho
infix fun String.isSameAs(other: String): Boolean = (this == other).also { println(it) } "SomeString".apply { isSameAs("Foo") isSameAs(this) }
false
true
A modern programming language that makes developers happier.