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.
- RFC 124 (v1) Sort order for any hash Perl6 RFC Librarian
- Re: RFC 124 (v1) Sort order for any hash Tom Hughes
- Re: RFC 124 (v1) Sort order for any hash Hildo Biersma
- Re: RFC 124 (v1) Sort order for any hash Hildo Biersma
- Re: RFC 124 (v1) Sort order for any hash Jonathan Scott Duff
- Re: RFC 124 (v1) Sort order for any h... David L. Nicol
- Re: RFC 124 (v1) Sort order for any hash Damian Conway
- Re: RFC 124 (v1) Sort order for any hash David L. Nicol
- Re: RFC 124 (v1) Sort order for any hash David L. Nicol
- Re: RFC 124 (v1) Sort order for any hash Damian Conway
- Re: RFC 124 (v1) Sort order for any h... Jeremy Howard
- Re: RFC 124 (v1) Sort order for any h... Damian Conway