mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2026-03-10 15:35:47 -04:00
Compare commits
No commits in common. "main" and "v3.18" have entirely different histories.
3 changed files with 9 additions and 17 deletions
|
|
@ -398,10 +398,7 @@ let sprintf_ c format =
|
||||||
Format.kfprintf
|
Format.kfprintf
|
||||||
(fun _fmt ->
|
(fun _fmt ->
|
||||||
Format.pp_print_flush fmt ();
|
Format.pp_print_flush fmt ();
|
||||||
let s = Buffer.contents buf in
|
Buffer.contents buf)
|
||||||
Buffer.reset buf;
|
|
||||||
(* in case of reuse *)
|
|
||||||
s)
|
|
||||||
fmt format
|
fmt format
|
||||||
|
|
||||||
let with_color_ksf ~f s fmt =
|
let with_color_ksf ~f s fmt =
|
||||||
|
|
|
||||||
|
|
@ -410,7 +410,4 @@ q
|
||||||
;;
|
;;
|
||||||
|
|
||||||
t @@ fun () -> "ab" < "abc";;
|
t @@ fun () -> "ab" < "abc";;
|
||||||
t @@ fun () -> "123" < "14";;
|
t @@ fun () -> "123" < "14"
|
||||||
|
|
||||||
eq ~printer:Fun.id "a,b,c,d,e,f,g,"
|
|
||||||
(flat_map (CCFormat.sprintf "%c,") "abcdefg")
|
|
||||||
|
|
|
||||||
|
|
@ -266,15 +266,13 @@ module Op = struct
|
||||||
list_small gen_x >|= fun l ->
|
list_small gen_x >|= fun l ->
|
||||||
Append l, size + List.length l );
|
Append l, size + List.length l );
|
||||||
];
|
];
|
||||||
(if size < 10_000 then
|
(if size < 10_000 then [
|
||||||
[
|
|
||||||
(* flat map can explode, only do it if list isn't too big *)
|
(* flat map can explode, only do it if list isn't too big *)
|
||||||
( 1,
|
( 1,
|
||||||
list_size (0 -- 5) gen_x >|= fun l ->
|
list_size (0 -- 5) gen_x >|= fun l ->
|
||||||
Flat_map l, size * (1 + List.length l) );
|
Flat_map l, size * (1 + List.length l) );
|
||||||
]
|
] else [])
|
||||||
else
|
;
|
||||||
[]);
|
|
||||||
]
|
]
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue