Module BatIO.Incubator.List

module List: sig .. end

val pp : ?flush:bool ->
?first:string ->
?last:string ->
?sep:string ->
?indent:int ->
(Format.formatter -> 'a -> 'b) -> Format.formatter -> 'a list -> unit
Print the contents of a list, with first preceeding the first item (default: "["), last following the last item (default: "]") and sep separating items (default: "; "). A printing function must be provided to print the items in the list. The flush parameter (default: false) should be set to true for the outer-most printing call. Setting inner calls to true - for example, for nested values - prevent indentation from working properly.

Example: pp ~flush:true Format.pp_print_int Format.std_formatter [1; 2; 3]