mirror of
https://github.com/Smaug123/fsharp-red-black-tree
synced 2025-10-10 02:08:48 +00:00
606d0cd5e782c70616b9c478d5d42cecb98d6196
Red-black tree
This is a basic implementation of a red-black tree in F#, which is pretty close to being correct by construction.
Things to fix
- Can we prove that the
failwith
cases indeed will never be hit? (Is it even true?) - Can we do better than the awful recursion to
elevateBlack
andelevateRed
? That is, can we make the type parameter truly phantom, erased at runtime? - Can we get some constraints at the type level to help us get the values assigned to the various nodes in the right order?
Languages
F#
100%