Handbook
Glossary
<bit-array> ( n -- bit-array )
Bit arrays
Prev:
>bit-array ( seq -- bit-array )
Next:
set-bits ( bit-array -- )
Vocabulary
bit-arrays
Inputs
n
a non-negative integer
Outputs
bit-array
a new
bit-array
Word description
Creates a new bit array with the given length and all elements initially set to
f
.
Definition
USING:
bit-arrays.private
byte-arrays
kernel
math
;
IN:
bit-arrays
:
<bit-array>
( n -- bit-array )
dup
0
<
[
bad-array-length
]
when
dup
bits>bytes
<byte-array>
bit-array
boa
;
inline