Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
9
Task/Arrays/Transd/arrays-1.transd
Normal file
9
Task/Arrays/Transd/arrays-1.transd
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
module1 : {
|
||||
v1: Vector<Int>(),
|
||||
v2: Vector<String>(),
|
||||
v3: Vector<Int>([1,2,3,4]),
|
||||
v4: Vector<String>(["one","two","three"]),
|
||||
// the type of vector values can automaticaly deduced
|
||||
v5: [1.0, 2.5, 8.6], // Vector<Double>
|
||||
v6: ["one","two","three"] // Vector<String>
|
||||
}
|
||||
7
Task/Arrays/Transd/arrays-2.transd
Normal file
7
Task/Arrays/Transd/arrays-2.transd
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
(with v [1,2,3]
|
||||
(textout (get v 1)) // <= 2
|
||||
(erase v 1)
|
||||
(textout v) // <= [1, 3]
|
||||
(append v 7)
|
||||
(textout v) // <= [1, 3, 7]
|
||||
)
|
||||
5
Task/Arrays/Transd/arrays-3.transd
Normal file
5
Task/Arrays/Transd/arrays-3.transd
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
(with v [3,1,5,2,4]
|
||||
(textout (reverse v)) // <= [4, 2, 5, 1, 3]
|
||||
(textout (sort v)) // <= [1, 2, 3, 4, 5]
|
||||
(textout (shuffle v)) // <= [5, 3, 4, 1, 2]
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue