[m-dev.] for review: new predicates in map.m

Andrew Bromage bromage at cs.mu.OZ.AU
Tue Oct 20 22:32:23 AEST 1998


G'day all.

Peter Schachte wrote:

> How inefficient is sorting a sorted list?

O(N log N) using list__sort/2 (the "standard" merge sort variation, which
is par for the course in declarative languages).

It would be interesting to try different variations to see if any of them
improved the average case.

> > No, there'd just be one typeclass-polymorphic method map__key_set/2
> > which would work for any kind of set.
> 
> If you push it to "any kind of collection," and replace map__keys with
> that predicate, then that sounds really good to me.

Any kind of collection... including lists?  map__keys/2 would be
redundant. :-)

Cheers,
Andrew Bromage



More information about the developers mailing list