A balanced binary search tree library for OCaml
  • OCaml 97.8%
  • Makefile 2%
  • Dune 0.2%
Find a file
2026-06-20 13:07:44 +02:00
announcements Avoid the word "persistent" in the announcement. 2024-12-10 14:56:40 +01:00
attic Rename the project from bistro to baby. 2024-06-19 13:56:12 +02:00
benchmark Extend the library with support for maps. 2024-11-07 14:28:21 +01:00
src Implement [is_singleton] on sets and maps. 2026-06-20 13:01:50 +02:00
test Implement [is_singleton] on sets and maps. 2026-06-20 13:01:50 +02:00
.gitattributes Rename LICENSE to LICENSE.txt. 2024-06-19 12:07:22 +02:00
.gitignore .gitignore 2024-12-04 22:18:46 +01:00
AUTHORS.md Add AUTHORS, CHANGES, LICENSE. 2024-06-14 22:38:19 +02:00
CHANGES.md CHANGES. 2026-06-20 13:07:44 +02:00
dune-project Improve dependency on monolith in dune-project. 2024-12-18 08:46:11 +01:00
HACKING.md Extend the library with support for maps. 2024-11-07 14:28:21 +01:00
headache.config Update [make headache]. Add [headache.config]. 2024-06-16 21:48:08 +02:00
header.txt Rename the project from bistro to baby. 2024-06-19 13:56:12 +02:00
LICENSE.txt Change the license to LGPL 2.0 with linking exception. 2024-06-19 13:47:45 +02:00
Makefile [make versions] 2026-06-20 13:05:46 +02:00
play.ml Rename the project from bistro to baby. 2024-06-19 13:56:12 +02:00
README.md Clarify that these sets and maps are immutable. 2024-12-10 14:56:31 +01:00
TODO.md TODO. 2025-11-27 17:33:45 +01:00

Baby: Fast Sets Based on Balanced Binary Search Trees

baby is an OCaml library that offers several implementations of immutable balanced binary search trees.

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.

Installation and Usage

Type opam install baby.

In your dune file, add (libraries baby) to the description of your library or executable.

To use baby's ready-made weight-balanced trees, just use the functor Baby.W.Set.Make instead of the usual Set.Make.

Documentation

For more information, please see the documentation of the latest released version.

Information for developers

An overview of the architecture of the library is given in HACKING.md.