In message <[EMAIL PROTECTED]>
          Perl6 RFC Librarian <[EMAIL PROTECTED]> wrote:

> A "sort function" will need to be added into the list of magics
> maintained for every associative array.
>
> A set of macros in terms of sort will need to be defined which
> replace keys, values, and each functions on sorted arrays

I would have thought the obvious way to handle a sorted map would
be to keep it as a balanced tree instead of a hash internally - that
way you don't need to keep sorting it when you access it.

Of course it does make key access O(lg n) instead of O(1).

Tom

-- 
Tom Hughes ([EMAIL PROTECTED])
http://www.compton.nu/
...Advancement in position.

Reply via email to