Handbook
Glossary
growable
Factor handbook
»
The language
»
Collections
»
Resizable sequence implementation
Next:
resize ( n seq -- newseq )
Vocabulary
growable
Definition
USING:
bit-vectors
byte-vectors
sbufs
specialized-vectors.instances.alien.c-types.short
specialized-vectors.instances.alien.c-types.uint
specialized-vectors.instances.alien.c-types.ushort
specialized-vectors.instances.game.loop.benchmark.game-loop-benchmark
specialized-vectors.instances.gpu.demos.bunny.bunny-vertex-struct
specialized-vectors.instances.math.vectors.simd.float-4
vectors
;
IN:
growable
MIXIN:
growable
INSTANCE:
byte-vector
growable
INSTANCE:
vector
growable
INSTANCE:
sbuf
growable
INSTANCE:
bit-vector
growable
INSTANCE:
short-vector
growable
INSTANCE:
game-loop-benchmark-vector
growable
INSTANCE:
ushort-vector
growable
INSTANCE:
float-4-vector
growable
INSTANCE:
uint-vector
growable
INSTANCE:
bunny-vertex-struct-vector
growable
Methods
USING:
accessors
containers
growable
sequences
;
M:
growable
capacity
underlying>>
length
;
USING:
accessors
growable
kernel
;
M:
growable
clone
(clone)
[
clone
]
change-underlying
;
inline
USING:
growable
kernel
math
sequences
sequences.private
;
M:
growable
contract
[
length
]
keep
[
[
0
]
2dip
set-nth-unsafe
]
curry
each-integer-from
;
inline
USING:
destructors
growable
kernel
;
M:
growable
dispose
drop
;
USING:
accessors
growable
sequences
;
M:
growable
length
length>>
;
inline
USING:
accessors
growable
kernel
math
sequences
;
M:
growable
lengthen
2dup
length
>
[
2dup
capacity
>
[
over
new-size
over
expand
]
when
2dup
length<<
]
when
2drop
;
inline
USING:
growable
kernel
sequences
;
M:
growable
new-resizable
new-sequence
0
over
set-length
;
inline
USING:
accessors
growable
sequences.private
;
M:
growable
nth-unsafe
underlying>>
nth-unsafe
;
inline
USING:
accessors
growable
kernel
math
sequences
sequences.private
;
M:
growable
set-length
bounds-check-head
2dup
length
<
[
2dup
contract
]
[
2dup
capacity
>
[
2dup
expand
]
when
]
if
length<<
;
USING:
growable
sequences
sequences.private
;
M:
growable
set-nth
ensure
set-nth-unsafe
;
inline
USING:
accessors
growable
sequences.private
;
M:
growable
set-nth-unsafe
underlying>>
set-nth-unsafe
;
inline
USING:
accessors
growable
kernel
math
sequences
sequences.private
;
M:
growable
shorten
bounds-check-head
2dup
length
<
[
2dup
contract
2dup
length<<
]
when
2drop
;
inline
USING:
growable
io
kernel
;
M:
growable
stream-flush
drop
;
USING:
growable
io
sequences
;
M:
growable
stream-write
push-all
;
USING:
growable
io
sequences
;
M:
growable
stream-write1
push
;