module Misc:sig..end
Misc
exception Internal_error of string
exception Not_implemented of string
val fatal_error : string -> 'a
val not_implemented : string -> 'a
val warning : string -> unit
val add_assoc : ('k * 'v) list -> 'k * 'v -> ('k * 'v) listadd_assoc (k,v) l returns the assocation list obtained by adding pair (k,v) to l when key k
does not appear in l. Returns l otherwise.
val collect_assoc : ('a -> ('k * 'v) list) -> 'a list -> ('k * 'v) listcollect f l returns the association list built from applying f to each element of l and
collecting all the (k,v) resulting pairs.
val fold_left : ('a -> 'b -> 'a) -> 'b list -> 'a -> 'aThis variant of List.fold_left allows fold_lefts to be chained with |>
val id : 'a -> 'aid x is simply x
val list_split_at : int -> 'a list -> 'a list * 'a listlist_split_at k [x1;...;xn] returns [x1;...;xk],[xk+1;...;xn] if 1<=k<=n. Raises Invalid_argument otherwise
val bit_size : int -> intbit_size n returns the number of bits required for representing n