Skip to content

Instantly share code, notes, and snippets.

@slavonnet
Created May 8, 2021 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slavonnet/08854f1148df842fd30ae99e3c686982 to your computer and use it in GitHub Desktop.
Save slavonnet/08854f1148df842fd30ae99e3c686982 to your computer and use it in GitHub Desktop.
?: funny
data class BIf(val res: Boolean, val u: Any)
infix fun BIf.`ee` ( u: Any) = if (!this.res) u else this.u
infix fun Boolean.`ii` ( u: Any) = BIf( this@ii, u)
fun test (): Any {
return true ii "aaa" ee "vccc"
}
@slavonnet
Copy link
Author

Aliases for
ii = ?
ee = :

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment