10 lines
258 B
Text
10 lines
258 B
Text
|
|
// version 1.0.6
|
||
|
|
|
||
|
|
infix fun Boolean.iif(cond: Boolean) = if (cond) this else !this
|
||
|
|
|
||
|
|
fun main(args: Array<String>) {
|
||
|
|
val raining = true
|
||
|
|
val needUmbrella = true iif (raining)
|
||
|
|
println("Do I need an umbrella? ${if(needUmbrella) "Yes" else "No"}")
|
||
|
|
}
|