mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
better Sequence.pp_seq, with trailing separator
This commit is contained in:
parent
79dbf5e843
commit
93eb787082
1 changed files with 6 additions and 3 deletions
|
|
@ -656,7 +656,10 @@ let pp_seq ?(sep=", ") pp_elt formatter seq =
|
||||||
let first = ref true in
|
let first = ref true in
|
||||||
iter
|
iter
|
||||||
(fun x ->
|
(fun x ->
|
||||||
(if !first then first := false else Format.pp_print_string formatter sep);
|
(if !first then first := false
|
||||||
pp_elt formatter x;
|
else begin
|
||||||
Format.pp_print_cut formatter ())
|
Format.pp_print_string formatter sep;
|
||||||
|
Format.pp_print_cut formatter ();
|
||||||
|
end);
|
||||||
|
pp_elt formatter x)
|
||||||
seq
|
seq
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue