Fix vector implementation bug
parent
51595cc78e
commit
1c1e6a7af0
|
@ -1,6 +1,6 @@
|
|||
USING: arrays kernel kernel.private math namespaces
|
||||
sequences sequences.private strings tools.test vectors
|
||||
continuations random growable ;
|
||||
continuations random growable classes ;
|
||||
IN: temporary
|
||||
|
||||
[ ] [ 10 [ [ -1000000 <vector> ] catch drop ] times ] unit-test
|
||||
|
@ -93,3 +93,7 @@ IN: temporary
|
|||
[ t ] [
|
||||
100 >array dup >vector <reversed> >array >r reverse r> =
|
||||
] unit-test
|
||||
|
||||
[ fixnum ] [ 1 >bignum V{ } new length class ] unit-test
|
||||
|
||||
[ fixnum ] [ 1 >bignum [ ] V{ } map-as length class ] unit-test
|
||||
|
|
|
@ -14,7 +14,7 @@ M: vector like
|
|||
dup array? [ dup length array>vector ] [ >vector ] if
|
||||
] unless ;
|
||||
|
||||
M: vector new drop [ f <array> ] keep array>vector ;
|
||||
M: vector new drop [ f <array> ] keep >fixnum array>vector ;
|
||||
|
||||
M: vector equal?
|
||||
over vector? [ sequence= ] [ 2drop f ] if ;
|
||||
|
|
Loading…
Reference in New Issue