package devkit

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Bit_struct_list.MakeSource

Parameters

module S : S

Signature

Sourcetype t
Sourceval of_list : int list -> t

of_list l converts a list of int values l, into a bit structure list.

Sourceval to_list : t -> int list

to_list b converts b into a list of int values.

Sourceval project : t -> string

project b returns an internal string representation of b.

Sourceval inject : string -> t

inject s initializes a bit list with an internal string representation s, previously returned by project.

Sourceval iter : (int -> unit) -> t -> unit

iter f b applies function f in turn to each item in b.

Sourceval iterwhile : (int -> bool) -> t -> bool

iterwhile f b applies function f in turn to each item in b until f returns false.

Sourceval fold_left : ('a -> int -> 'a) -> 'a -> t -> 'a

fold_left f a b applies function f in turn to each item in b and passes the result of previous step, similarly to List.fold_left.

Sourceval exists : (int -> bool) -> t -> bool

exists p b checks if at least one element of b satisfies the predicate p.

Sourceval pp : t -> string

pp b returns a pretty-print string using S.pp for each item of b.