]> gitweb.factorcode.org Git - factor.git/blob - core/bit-vectors/bit-vectors-docs.factor
Fix regression
[factor.git] / core / bit-vectors / bit-vectors-docs.factor
1 USING: arrays bit-arrays help.markup help.syntax kernel\r
2 bit-vectors.private combinators ;\r
3 IN: bit-vectors\r
4 \r
5 ARTICLE: "bit-vectors" "Bit vectors"\r
6 "A bit vector is a resizable mutable sequence of bits. The literal syntax is covered in " { $link "syntax-bit-vectors" } ". Bit vector words are found in the " { $vocab-link "bit-vectors" } " vocabulary."\r
7 $nl\r
8 "Bit vectors form a class:"\r
9 { $subsection bit-vector }\r
10 { $subsection bit-vector? }\r
11 "Creating bit vectors:"\r
12 { $subsection >bit-vector }\r
13 { $subsection <bit-vector> }\r
14 "If you don't care about initial capacity, a more elegant way to create a new bit vector is to write:"\r
15 { $code "?V{ } clone" } ;\r
16 \r
17 ABOUT: "bit-vectors"\r
18 \r
19 HELP: bit-vector\r
20 { $description "The class of resizable bit vectors. See " { $link "syntax-bit-vectors" } " for syntax and " { $link "bit-vectors" } " for general information." } ;\r
21 \r
22 HELP: <bit-vector>\r
23 { $values { "n" "a positive integer specifying initial capacity" } { "bit-vector" bit-vector } }\r
24 { $description "Creates a new bit vector that can hold " { $snippet "n" } " bits before resizing." } ;\r
25 \r
26 HELP: >bit-vector\r
27 { $values { "seq" "a sequence" } { "bit-vector" bit-vector } }\r
28 { $description "Outputs a freshly-allocated bit vector with the same elements as a given sequence." } ;\r
29 \r
30 HELP: bit-array>vector\r
31 { $values { "bit-array" "an array" } { "length" "a non-negative integer" } { "bit-vector" bit-vector } }\r
32 { $description "Creates a new bit vector using the array for underlying storage with the specified initial length." }\r
33 { $warning "This word is in the " { $vocab-link "bit-vectors.private" } " vocabulary because it does not perform type or bounds checks. User code should call " { $link >bit-vector } " instead." } ;\r