Maximilian Wilson wrote:
Hello, all. I just posted this to comp.lang.misc, but my professor told me about the Mozart users mailing list so I'm repeating. Hope you don't mind. I am really growing to love the Mozart/Oz language, but one thing that's been nagging me is that the built-in storage types (arrays, dictionarys) only work for integers and literals, and I couldn't find an arbitrary binary tree type when I searched MOGUL. So I looked up a red-black binary tree algorithm and implemented it in Oz. All you need to provide is a comparator function, and you can store any object in the tree.
Thanks for the code!
For people who would like to compare programming paradigms, there is a declarative
algorithm for red-black trees at: http://www.info.ucl.ac.be/people/PVR/ds/mitbook.html#course2 (see the slides for Chapter 3). Peter _________________________________________________________________________________ mozart-users mailing list [email protected] http://www.mozart-oz.org/mailman/listinfo/mozart-users
