Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
27
Task/Collections/E/collections.e
Normal file
27
Task/Collections/E/collections.e
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
? def constList := [1,2,3,4,5]
|
||||
# value: [1, 2, 3, 4, 5]
|
||||
|
||||
? constList.with(6)
|
||||
# value: [1, 2, 3, 4, 5, 6]
|
||||
|
||||
? def flexList := constList.diverge()
|
||||
# value: [1, 2, 3, 4, 5].diverge()
|
||||
|
||||
? flexList.push(6)
|
||||
? flexList
|
||||
# value: [1, 2, 3, 4, 5, 6].diverge()
|
||||
|
||||
? constList
|
||||
# value: [1, 2, 3, 4, 5]
|
||||
|
||||
? def constMap := [1 => 2, 3 => 4]
|
||||
# value: [1 => 2, 3 => 4]
|
||||
|
||||
? constMap[1]
|
||||
# value: 2
|
||||
|
||||
? def constSet := [1, 2, 3, 2].asSet()
|
||||
# value: [1, 2, 3].asSet()
|
||||
|
||||
? constSet.contains(3)
|
||||
# value: true
|
||||
Loading…
Add table
Add a link
Reference in a new issue