mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-09 04:35:29 -05:00
add CCBV.print
This commit is contained in:
parent
ff6157771e
commit
819c1f3249
2 changed files with 11 additions and 0 deletions
|
|
@ -300,3 +300,10 @@ let of_seq seq =
|
||||||
|> CCList.of_seq |> List.sort CCOrd.compare = CCList.range 0 10
|
|> CCList.of_seq |> List.sort CCOrd.compare = CCList.range 0 10
|
||||||
*)
|
*)
|
||||||
|
|
||||||
|
let print out bv =
|
||||||
|
Format.pp_print_string out "bv {";
|
||||||
|
iter bv
|
||||||
|
(fun _i b ->
|
||||||
|
Format.pp_print_char out (if b then '1' else '0')
|
||||||
|
);
|
||||||
|
Format.pp_print_string out "}"
|
||||||
|
|
|
||||||
|
|
@ -113,3 +113,7 @@ type 'a sequence = ('a -> unit) -> unit
|
||||||
|
|
||||||
val to_seq : t -> int sequence
|
val to_seq : t -> int sequence
|
||||||
val of_seq : int sequence -> t
|
val of_seq : int sequence -> t
|
||||||
|
|
||||||
|
val print : Format.formatter -> t -> unit
|
||||||
|
(** Print the bitvector
|
||||||
|
@since NEXT_RELEASE *)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue