infix fun Boolean.q(primary: T) = if (this) Ternary(primary) else null infix fun Ternary?.e(other: T) = if (this == null) other else result data class Ternary(internal val result: T) val bool = true println(bool q "true" e "false")