September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
9
Task/Inverted-syntax/Kotlin/inverted-syntax.kotlin
Normal file
9
Task/Inverted-syntax/Kotlin/inverted-syntax.kotlin
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// 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"}")
|
||||
}
|
||||
6
Task/Inverted-syntax/M4/inverted-syntax.m4
Normal file
6
Task/Inverted-syntax/M4/inverted-syntax.m4
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
define(`thenif', `ifelse($2, $3, `$1')')dnl
|
||||
dnl
|
||||
ifelse(eval(23 > 5), 1, 23 is greater than 5)
|
||||
ifelse(eval(23 > 5), 0, math is broken)
|
||||
thenif(23 is greater than 5, eval(23 > 5), 1)
|
||||
thenif(math is broken, eval(23 > 5), 0)
|
||||
2
Task/Inverted-syntax/Zkl/inverted-syntax-1.zkl
Normal file
2
Task/Inverted-syntax/Zkl/inverted-syntax-1.zkl
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
if (raining==True) needumbrella:=True;
|
||||
(raining==True) : if (_) needumbrella:=True;
|
||||
2
Task/Inverted-syntax/Zkl/inverted-syntax-2.zkl
Normal file
2
Task/Inverted-syntax/Zkl/inverted-syntax-2.zkl
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
a := 6
|
||||
6 : a:=_
|
||||
2
Task/Inverted-syntax/Zkl/inverted-syntax-3.zkl
Normal file
2
Task/Inverted-syntax/Zkl/inverted-syntax-3.zkl
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
key.sort(fcn(kv,kv2){kv[0] < kv2[0]}) : listUnzip(_) :
|
||||
D.SD((_).xplode()) : return(_);
|
||||
Loading…
Add table
Add a link
Reference in a new issue