Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
5
Task/Generic-swap/Sidef/generic-swap-1.sidef
Normal file
5
Task/Generic-swap/Sidef/generic-swap-1.sidef
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
func swap(Ref a, Ref b) {
|
||||
var tmp = *a;
|
||||
*a = *b;
|
||||
*b = tmp;
|
||||
}
|
||||
3
Task/Generic-swap/Sidef/generic-swap-2.sidef
Normal file
3
Task/Generic-swap/Sidef/generic-swap-2.sidef
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
func swap(Ref a, Ref b) {
|
||||
(*a, *b) = (*b, *a);
|
||||
}
|
||||
3
Task/Generic-swap/Sidef/generic-swap-3.sidef
Normal file
3
Task/Generic-swap/Sidef/generic-swap-3.sidef
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
func swap(Ref a, Ref b) {
|
||||
[*a, *b] » (b, a);
|
||||
}
|
||||
2
Task/Generic-swap/Sidef/generic-swap-4.sidef
Normal file
2
Task/Generic-swap/Sidef/generic-swap-4.sidef
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
var (x, y) = (1, 2);
|
||||
swap(\x, \y);
|
||||
Loading…
Add table
Add a link
Reference in a new issue