new tasks
This commit is contained in:
parent
2a4d27cea0
commit
80737d5a6a
1194 changed files with 15353 additions and 1 deletions
7
Task/Collections/Forth/collections-2.fth
Normal file
7
Task/Collections/Forth/collections-2.fth
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
include ffl/dcl.fs
|
||||
|
||||
dcl-create dl \ create a double linked list
|
||||
|
||||
3 dl dcl-append
|
||||
1 dl dcl-prepend
|
||||
2 1 dl dcl-insert \ dl[0] = 1 dl[1] = 2 dl[2] = 3
|
||||
7
Task/Collections/Forth/collections-3.fth
Normal file
7
Task/Collections/Forth/collections-3.fth
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
include ffl/hct.fs
|
||||
|
||||
10 hct-create ht \ create a hashtable with initial size 10
|
||||
|
||||
1 s" one" ht hct-insert \ ht["one"] = 1
|
||||
2 s" two" ht hct-insert \ ht["two"] = 2
|
||||
3 s" three" ht hct-insert \ ht["three"] = 3
|
||||
7
Task/Collections/Forth/collections.fth
Normal file
7
Task/Collections/Forth/collections.fth
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
include ffl/car.fs
|
||||
|
||||
10 car-create ar \ create a dynamic array with initial size 10
|
||||
|
||||
2 0 ar car-set \ ar[0] = 2
|
||||
3 1 ar car-set \ ar[1] = 3
|
||||
1 0 ar car-insert \ ar[0] = 1 ar[1] = 2 ar[2] = 3
|
||||
Loading…
Add table
Add a link
Reference in a new issue