mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2026-03-07 21:27:55 -05:00
Compare commits
3 commits
ec898e631f
...
bc9f361e56
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc9f361e56 | ||
|
|
42bfe9c8c6 | ||
|
|
ea5d9bbdf4 |
7 changed files with 26 additions and 14 deletions
18
CHANGELOG.md
18
CHANGELOG.md
|
|
@ -1,10 +1,16 @@
|
|||
|
||||
## main
|
||||
- breaking: CCListLabel.compare and CCListLabel.equal takes the function on the elements as named arguments
|
||||
- breaking: CCListLabel.init now takes the length as a named arguments to follow the Stdlib
|
||||
- breaking: change the semantic of CCFloat.{min,max} with respect to NaN to follow the Stdlib
|
||||
- breaking: change the semantic of CCInt.rem with respect to negative number to follow the Stdlib
|
||||
- breaking: change the order of argument of CCMap.add_seq to align with the stdlib.
|
||||
## 3.18
|
||||
|
||||
- fix leb128 slice bug
|
||||
- fix leb128 `Int64.min_int` bug
|
||||
- add tests for leb128 library (#486)
|
||||
- fix size explosion in `t_pvec.ml` found in CI
|
||||
- some breaking changes after the big bump to 4.08 as lower bound, thanks to @fardale for the cleanup
|
||||
* breaking: CCListLabel.compare and CCListLabel.equal takes the function on the elements as named arguments
|
||||
* breaking: CCListLabel.init now takes the length as a named arguments to follow the Stdlib
|
||||
* breaking: change the semantic of CCFloat.{min,max} with respect to NaN to follow the Stdlib
|
||||
* breaking: change the semantic of CCInt.rem with respect to negative number to follow the Stdlib
|
||||
* breaking: change the order of argument of `CCMap.add_seq` to align with the stdlib.
|
||||
|
||||
## 3.17
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# This file is generated by dune, edit dune-project instead
|
||||
opam-version: "2.0"
|
||||
version: "3.17"
|
||||
version: "3.18"
|
||||
synopsis: "A set of advanced datatypes for containers"
|
||||
maintainer: ["c-cube"]
|
||||
authors: ["c-cube"]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# This file is generated by dune, edit dune-project instead
|
||||
opam-version: "2.0"
|
||||
version: "3.17"
|
||||
version: "3.18"
|
||||
synopsis:
|
||||
"A modular, clean and powerful extension of the OCaml standard library"
|
||||
maintainer: ["c-cube"]
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
(generate_opam_files true)
|
||||
|
||||
(version 3.17)
|
||||
(version 3.18)
|
||||
|
||||
(authors c-cube)
|
||||
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ val option : ?none:unit printer -> 'a printer -> 'a option printer
|
|||
- [Some x] will become [pp x]
|
||||
- [None] will become [none ()]
|
||||
Alias of {!Format.pp_print_option}
|
||||
@since NEXT_RELEASE *)
|
||||
@since 3.18 *)
|
||||
|
||||
val opt : 'a printer -> 'a option printer
|
||||
(** [opt pp] prints options as follows:
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ val forever : (unit -> 'a) -> 'a t
|
|||
|
||||
val cycle : 'a t -> 'a t
|
||||
(** Cycle through the sequence infinitely. The sequence should be persistent.
|
||||
@since NEXT_RELEASE the sequence can be empty, in this case cycle return an empty sequence. *)
|
||||
@since 3.18 the sequence can be empty, in this case cycle return an empty sequence. *)
|
||||
|
||||
val iterate : ('a -> 'a) -> 'a -> 'a t
|
||||
(** [iterate f a] corresponds to the infinite sequence containing [a], [f a], [f (f a)],
|
||||
|
|
|
|||
|
|
@ -265,10 +265,16 @@ module Op = struct
|
|||
( 1,
|
||||
list_small gen_x >|= fun l ->
|
||||
Append l, size + List.length l );
|
||||
];
|
||||
(if size < 10_000 then
|
||||
[
|
||||
(* flat map can explode, only do it if list isn't too big *)
|
||||
( 1,
|
||||
list_size (0 -- 5) gen_x >|= fun l ->
|
||||
Flat_map l, size * (1 + List.length l) );
|
||||
];
|
||||
]
|
||||
else
|
||||
[]);
|
||||
]
|
||||
in
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue