Next: , Previous: , Up: Scheme reference   [Contents][Index]

4.3 Bitvectors

The (hoot bitvectors) module provides bitvectors, which are tightly packed arrays of booleans.

Procedure: make-bitvector len [fill #f]

Return a new bitvector of len bits with all bits initialized to fill.

Procedure: bitvector? obj

Return #t if obj is a bitvector.

Procedure: bitvector-length bv

Return the length of the bitvector bv.

Procedure: bitvector-ref bv i

Return the boolean value of bit i in the bitvector bv.

Procedure: bitvector-set-bit! bv i

Set the bit i in the bitvector bv to #t.