1 USING: vlists kernel persistent.sequences arrays tools.test
2 namespaces accessors sequences assocs ;
6 [ VL{ } "hi" swap ppush "there" swap ppush >array ] unit-test
8 [ VL{ "hi" "there" "foo" } VL{ "hi" "there" "bar" } t ]
10 VL{ } "hi" swap ppush "there" swap ppush "v" set
13 dup "baz" over ppush [ vector>> ] bi@ eq?
16 [ "foo" VL{ "hi" "there" } t ]
18 VL{ "hi" "there" "foo" } dup "v" set
20 dup "v" get [ vector>> ] bi@ eq?
23 [ VL{ } 3 over push ] must-fail
25 [ 4 VL{ "hi" } set-first ] must-fail
28 "rice" VA{ { "rice" 5 } { "beans" 10 } } at*
32 "rice" VA{ { "rice" 5 } { "beans" 10 } { "rice" 6 } } at*
36 VA{ { "rice" 5 } { "beans" 10 } { "rice" 6 } } assoc-size
40 "meat" VA{ { "rice" 5 } { "beans" 10 } { "rice" 6 } } at*