1 USING: help.markup help.syntax sequences ;
\r
4 ARTICLE: "bit-vectors" "Bit vectors"
\r
5 "A bit vector is a resizable mutable sequence of bits. Bit vector words are found in the " { $vocab-link "bit-vectors" } " vocabulary."
\r
7 "Bit vectors form a class:"
\r
12 "Creating bit vectors:"
\r
18 { $subsections POSTPONE: ?V{ }
\r
19 "If you don't care about initial capacity, a more elegant way to create a new bit vector is to write:"
\r
20 { $code "?V{ } clone" } ;
\r
22 ABOUT: "bit-vectors"
\r
25 { $description "The class of resizable bit vectors. See " { $link "bit-vectors" } " for information." } ;
\r
28 { $values { "capacity" "a positive integer specifying initial capacity" } { "vector" bit-vector } }
\r
29 { $description "Creates a new bit vector that can hold " { $snippet "n" } " bits before resizing." } ;
\r
32 { $values { "seq" sequence } { "vector" bit-vector } }
\r
33 { $description "Outputs a freshly-allocated bit vector with the same elements as a given sequence." } ;
\r
36 { $syntax "?V{ elements... }" }
\r
37 { $values { "elements" "a list of booleans" } }
\r
38 { $description "Marks the beginning of a literal bit vector. Literal bit vectors are terminated by " { $link POSTPONE: } } "." }
\r
39 { $examples { $code "?V{ t f t }" } } ;
\r