Purely Functional Data Structures : Red Black Trees in Qi
jng.imagine27.com
jng.imagine27.com
http://everything2.com/title/Binary+search+trees+in+Prolog#W...
Prolog has "difference lists", which are (currently) pretty unique to Prolog. Its special case of variables that can be mutated, but only once, has interesting implications.
I'm not going to put any performance statistics up, though if someone has enough free time to compare the two, it'd be interesting to see the result.
https://github.com/yairchu/red-black-tree/blob/master/RedBla...