Red-Black Trees in a Functional Setting (Okasaki, 1993)
eecs.usma.edu
eecs.usma.edu
http://www.cs.cmu.edu/~rwh/theses/okasaki.pdf
I'd highly recommend it. It's hard to find a dissertation that reads like a novel, but he somehow managed to accomplish such a feat.
It's hard to find a dissertation that reads like a novel
That's why he turned it into a book: http://www.amazon.com/Purely-Functional-Structures-Chris-Oka...But I'm a poor grad student, so I'll read the free dissertation over the $75 book. ;)
There is an implementation that is pretty faithful to Okasaki's paper here: http://www.cs.kent.ac.uk/people/staff/smk/redblack/Untyped.h... . I used as a reference once because it also implements delete.
In the same directory, Kahrs develops other versions with stronger constraints coming from the type system, but I never got far enough in to Haskell back then to understand them.
http://matt.might.net/articles/implementation-of-immutable-p...
I think I still have his ML implementation of Red-Black trees he gave the class.