A deque based on binary trees
- by Greg Ros
This is a simple immutable deque based on binary trees. What do you think about it? Does this kind of data structure, or possibly an improvement thereof, seem useful? How could I improve it, preferably without getting rid of its strengths? (Not in the sense of more operations, in the sense of different design) Does this sort of thing have a name?
Red nodes are newly instantiated; blue ones are reused. Nodes aren't actually red or anything, it's just for emphasis.