2004-08-04 03:12:55 -04:00
|
|
|
IN: scratchpad
|
|
|
|
USE: lists
|
|
|
|
USE: namespaces
|
|
|
|
USE: test
|
|
|
|
|
|
|
|
[ [ 1 ] ] [ 1 f ] [ "x" set "x" cons@ "x" get ] test-word
|
|
|
|
[ [ 1 | 2 ] ] [ 1 2 ] [ "x" set "x" cons@ "x" get ] test-word
|
|
|
|
[ [ 1 2 ] ] [ 1 [ 2 ] ] [ "x" set "x" cons@ "x" get ] test-word
|
2004-09-28 00:24:36 -04:00
|
|
|
|
|
|
|
[ [ [ 2 | 3 ] [ 1 | 2 ] ] ] [
|
|
|
|
"x" off 2 1 "x" acons@ 3 2 "x" acons@ "x" get
|
|
|
|
] unit-test
|
|
|
|
|
2004-10-03 16:39:32 -04:00
|
|
|
[ [ 5 4 3 1 ] ] [
|
|
|
|
[ 5 4 3 2 1 ] "x" set
|
2004-12-10 21:39:27 -05:00
|
|
|
2 "x" [ remove ] change
|
2004-10-03 16:39:32 -04:00
|
|
|
"x" get
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
[ [ "hello" f ] ] [
|
|
|
|
"x" off
|
|
|
|
f "x" unique@
|
|
|
|
"hello" "x" unique@
|
|
|
|
f "x" unique@
|
|
|
|
5 "x" unique@
|
|
|
|
f "x" unique@
|
2004-12-10 21:39:27 -05:00
|
|
|
5 "x" [ remove ] change
|
2004-10-03 16:39:32 -04:00
|
|
|
"hello" "x" unique@
|
|
|
|
"x" get
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
[ [ "xyz" #{ 3 2 } 1/5 [ { } ] ] ] [
|
2004-11-11 15:15:43 -05:00
|
|
|
[ "xyz" , "xyz" unique,
|
2004-10-03 16:39:32 -04:00
|
|
|
#{ 3 2 } , #{ 3 2 } unique,
|
|
|
|
1/5 , 1/5 unique,
|
2004-11-11 15:15:43 -05:00
|
|
|
[ { } unique, ] make-list , ] make-list
|
2004-10-03 16:39:32 -04:00
|
|
|
] unit-test
|