Hello,
It is my pleasure to announce the second release of baby
.
opam update
opam install baby.20241204
baby
is an OCaml library that offers persistent sets and maps based on balanced binary search trees. It offers replacements for OCaml’s Set
and Map
modules.
Height-balanced and weight-balanced binary search trees are offered out of the box. Furthermore, to advanced users, the library offers a lightweight way of implementing other balancing strategies.
Documentation is available online.
The changes in this release are as follows:
-
The library now offers both sets and maps. The modules
Baby.H.Set
andBaby.W.Set
continue to exist, and are compatible with OCaml’sSet
library. The modulesBaby.H.Map
andBaby.W.Map
appear, and are compatible with OCaml’sMap
library. Furthermore, the functorsBaby.H.Make
andBaby.W.Make
appear. These functors produce a module that contains sets, maps, and two conversion functions between sets and maps, namelydomain
andlift
. -
Documentation: in the signature
OrderedType
, clarify the specification of the functioncompare
; this function decides a total preorder≤
. -
Documentation: in the preamble, clarify that, most of the time, we assume that
≤
is a total order; if an operation must be understood in the more general case where≤
is a total preorder, then this is explicitly indicated. -
Documentation: update the documentation of
find
andfind_opt
in accordance with the previous point. -
A number of incompatible changes have been made; see the change log for details.