Rudimentary port of http://en.literateprograms.org/Red-black_tree_(Java) to scala, in the imperative style.