On 23/05/2012 16:05, Roman D. Boiko wrote:
<snip>
I need some immutable collections for my D Compiler Tools project, namely 
linked list,
red-black tree, and possibly some others.
<snip>

What's the point of an immutable red-black tree?

The whole point of a red-black tree is to facilitate fast dynamic addition, removal and lookup of elements.

When the tree is immutable, only lookup speed is of any real relevance, so you might as well create a perfectly balanced binary tree. Or even better, an array.

Stewart.

Reply via email to