Purely Functional Data Structures & Algorithms : Red-Black Trees in Qi