mirror of
https://github.com/Smaug123/fsharp-red-black-tree
synced 2025-10-10 10:18:40 +00:00
7331d32d7df9181bc5b473aef66a85c0f77d45e3
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%