On this page:
bit?
bit->boolean
boolean->bit
7.4

5.1 Bits

 (require rebellion/binary/bit) package: rebellion

A bit is either zero or one. Eight bits form a byte, and a bitstring is an arbitrary-length sequence of bits.

procedure

(bit? v)  boolean?

  v : any/c
A predicate for bits.

procedure

(bit->boolean b)  boolean?

  b : bit?
Converts zero to false and one to true.

Examples:
> (bit->boolean 0)

#f

> (bit->boolean 1)

#t

procedure

(boolean->bit bool)  bit?

  bool : boolean?
Converts true to one and false to zero.

Examples:
> (boolean->bit #t)

1

> (boolean->bit #f)

0