Also take a look at dcollections 2.0: http://www.dsource.org/projects/dcollections (the d2 branch). I think RBT was derived from there by Steven himself. Or maybe I'm thinking of another structure.