My silly "ternary" conditional operator: operator ...
# getting-started
l
My silly "ternary" conditional operator: operator inline fun <reified T> Boolean.mod(yes: T): T? = if(this) yes else null And usage: val t = someBoolean % someTForTrue ?: someTForFalse And the question is: Is it just confusing for reader, or is it also slower than: val t = if(someBoolean) someTForTrue else someTForFalse ? simple smile