1 USING: vlists kernel persistent.sequences arrays tools.test
2 namespaces accessors sequences assocs ;
5 [ VL{ } "hi" swap ppush "there" swap ppush >array ] unit-test
7 { VL{ "hi" "there" "foo" } VL{ "hi" "there" "bar" } t }
9 VL{ } "hi" swap ppush "there" swap ppush "v" set
12 dup "baz" over ppush [ vector>> ] bi@ eq?
15 { "foo" VL{ "hi" "there" } t }
17 VL{ "hi" "there" "foo" } dup "v" set
19 dup "v" get [ vector>> ] bi@ eq?
22 [ VL{ } 3 suffix! ] must-fail
24 [ 4 VL{ "hi" } set-first ] must-fail
27 "rice" VA{ { "rice" 5 } { "beans" 10 } } at*
31 "rice" VA{ { "rice" 5 } { "beans" 10 } { "rice" 6 } } at*
35 VA{ { "rice" 5 } { "beans" 10 } { "rice" 6 } } assoc-size
39 "meat" VA{ { "rice" 5 } { "beans" 10 } { "rice" 6 } } at*