Go to file
Patrick Stevens 2484213fe0 Create LICENSE
2020-10-25 13:48:32 +00:00
2020-10-25 13:43:37 +00:00
2020-10-25 13:43:37 +00:00
2020-10-25 10:25:38 +00:00
2020-10-25 10:25:38 +00:00
2020-10-25 13:48:32 +00:00
2020-10-25 13:43:37 +00:00
2020-10-25 10:25:38 +00:00
2020-10-25 13:43:37 +00:00

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 and elevateRed? 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?
Description
A toy red-black tree, aiming to be as correct as possible by construction
Readme MIT 131 KiB
Languages
F# 100%