On 20/11/13 13:16, jean-marc Mercier wrote:
ok. I've done a first draft that is working. I will keep the code a little bit to tune and complete it. For instance, that could be an idea to implement the remove($map,$key) function, or to implement key($map).
Implenting keys($map) can be done using the fold() function. I recall the remove() algorithm being a fair amount harder to implement in a functional red/black tree, and I didn't need it so I didn't tackle it.
However, I have to modify your rbtree to do it.
Very happy to accept contributions of a remove() implementation if you do it. :-)
John -- John Snelson, Lead Engineer http://twitter.com/jpcs MarkLogic Corporation http://www.marklogic.com _______________________________________________ [email protected] http://x-query.com/mailman/listinfo/talk
