Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
8
Task/Collections/Raven/collections-1.raven
Normal file
8
Task/Collections/Raven/collections-1.raven
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[ 1 2 3 'abc' ] as a_list
|
||||
a_list print
|
||||
|
||||
list (4 items)
|
||||
0 => 1
|
||||
1 => 2
|
||||
2 => 3
|
||||
3 => "abc"
|
||||
6
Task/Collections/Raven/collections-2.raven
Normal file
6
Task/Collections/Raven/collections-2.raven
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ 'a' 1 'b' 2 } as a_hash
|
||||
a_hash print
|
||||
|
||||
hash (2 items)
|
||||
a => 1
|
||||
b => 2
|
||||
3
Task/Collections/Raven/collections-3.raven
Normal file
3
Task/Collections/Raven/collections-3.raven
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
17 a_list 1 set # set second item
|
||||
42 a_hash 'b' set # set item with key 'b'
|
||||
42 a_hash:b # shorthand
|
||||
3
Task/Collections/Raven/collections-4.raven
Normal file
3
Task/Collections/Raven/collections-4.raven
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
a_list 1 get # get second item
|
||||
a_hash 'b' get # get item with key 'b'
|
||||
a_hash.b # shorthand
|
||||
6
Task/Collections/Raven/collections-5.raven
Normal file
6
Task/Collections/Raven/collections-5.raven
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
42 a_list push # append an item
|
||||
a_list pop # remove last item
|
||||
42 a_list shove # prepend an item
|
||||
a_list shift # remove first item
|
||||
42 a_list 1 insert # insert item second, shuffling others down
|
||||
a_list 1 remove # retrieve second item, shuffling others up
|
||||
Loading…
Add table
Add a link
Reference in a new issue