Immutable Red-Black trees

bearophile bearophileHUGS at lycos.com
Mon Nov 25 17:32:47 PST 2013


Craig Dillabaugh:

> While I am at it, I might as well ask another question.  How is 
> it that your 'insert' function is const?  I thought I 
> understood const, but apparently not!

The D code I have linked is not yet working, so don't read too 
much in it.
But you can add items to an immutable tree, if you use structural 
sharing.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list