Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
11
Task/Arrays/E/arrays-1.e
Normal file
11
Task/Arrays/E/arrays-1.e
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
? def empty := []
|
||||
# value: []
|
||||
|
||||
? def numbers := [1,2,3,4,5]
|
||||
# value: [1, 2, 3, 4, 5]
|
||||
|
||||
? numbers.with(6)
|
||||
# value: [1, 2, 3, 4, 5, 6]
|
||||
|
||||
? numbers + [4,3,2,1]
|
||||
# value: [1, 2, 3, 4, 5, 4, 3, 2, 1]
|
||||
8
Task/Arrays/E/arrays-2.e
Normal file
8
Task/Arrays/E/arrays-2.e
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
? var numbers := []
|
||||
# value: []
|
||||
|
||||
? numbers := numbers.with(1)
|
||||
# value: [1]
|
||||
|
||||
? numbers with= 2 # shorthand for same
|
||||
# value: [1, 2]
|
||||
12
Task/Arrays/E/arrays-3.e
Normal file
12
Task/Arrays/E/arrays-3.e
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
? def flex := numbers.diverge()
|
||||
# value: [1, 2].diverge()
|
||||
|
||||
? flex.push(-3)
|
||||
? flex
|
||||
# value: [1, 2, -3].diverge()
|
||||
|
||||
? numbers
|
||||
# value: [1, 2]
|
||||
|
||||
? flex.snapshot()
|
||||
# value: [1, 2, -3]
|
||||
1
Task/Arrays/E/arrays-4.e
Normal file
1
Task/Arrays/E/arrays-4.e
Normal file
|
|
@ -0,0 +1 @@
|
|||
([0] * 100).diverge(int) # contains 100 zeroes, can only contain integers
|
||||
Loading…
Add table
Add a link
Reference in a new issue