factor/library/collections/vectors.facts

11 lines
507 B
Plaintext

USING: arrays help strings vectors ;
HELP: <vector> "( n -- vector )"
{ $values { "n" "a positive integer specifying initial capacity" } { "vector" "a new vector" } }
{ $description "Creates a new vector that can hold " { $snippet "n" } " elements before resizing." }
{ $see-also <array> <string> <sbuf> } ;
HELP: >vector "( seq -- vector )"
{ $values { "seq" "a sequence" } { "vector" "a new vector" } }
{ $description "Outputs a freshly-allocated vector with the same elements as a given sequence." } ;