Up

Module Bitarray = Bitarray

Signature

type t
include Core.Std.Sexpable with type t := t
type t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val create : int -> t

create size size must be less than ((word size - 2) * max array length)

val get : t -> int -> bool

get t pos get the value in position pos, raises Invalid_argument if the position is out of bounds.

val set : t -> int -> bool -> unit

set t pos set the value in position pos, raises Invalid_argument if the position is out of bounds.

val clear : t -> unit

clear t set the contents of every element to false O(n / (word_size - 2))

val fold : t -> init:'a -> f:('a -> bool -> 'a) -> 'a

fold t ~init ~f Fold over the array as in Array.fold

val iter : t -> f:(bool -> unit) -> unit

iter t ~f Iterate over the array as in Array.iter