Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
8
Task/Generic-swap/EMal/generic-swap.emal
Normal file
8
Task/Generic-swap/EMal/generic-swap.emal
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fun swap = Pair by var a, var b do return var%var(b => a) end
|
||||
int a = 1
|
||||
int b = 2
|
||||
writeLine("before swap: a=" + a + ", b=" + b)
|
||||
Pair pair = swap(a, b)
|
||||
a = pair[0]
|
||||
b = pair[1]
|
||||
writeLine(" after swap: a=" + a + ", b=" + b)
|
||||
Loading…
Add table
Add a link
Reference in a new issue