Commit 4c2a99e2 by POTTIER Francois

Remove the terminated list printers in [Misc].

parent f388bbc2
......@@ -100,17 +100,6 @@ let separated_iter_to_string printer separator iter =
let separated_list_to_string printer separator xs =
separated_iter_to_string printer separator (fun f -> List.iter f xs)
let terminated_iter_to_string printer terminator iter =
let b = Buffer.create 32 in
iter (fun x ->
Buffer.add_string b (printer x);
Buffer.add_string b terminator
);
Buffer.contents b
let terminated_list_to_string printer terminator xs =
terminated_iter_to_string printer terminator (fun f -> List.iter f xs)
let inverse (a : 'a array) : 'a -> int =
let table = Hashtbl.create (Array.length a) in
Array.iteri (fun i data ->
......
......@@ -67,13 +67,6 @@ type 'a iter = ('a -> unit) -> unit
val separated_iter_to_string: ('a -> string) -> string -> 'a iter -> string
val separated_list_to_string: ('a -> string) -> string -> 'a list -> string
(* [terminated_list_to_string printer term l] converts [l] into a string
representation built by using [printer] on each element and [term] as
a terminator. *)
val terminated_list_to_string: ('a -> string) -> string -> 'a list -> string
val terminated_iter_to_string: ('a -> string) -> string -> 'a iter -> string
(* If [a] is an array, therefore a mapping of integers to elements, then
[inverse a] computes its inverse, a mapping of elements to integers.
The type ['a] of elements must support the use of OCaml's generic
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment