Hans Aberg wrote:
> 
> >Has anyone done any work on comings up with an STL like collection of
> >Containers and Algorithms for Haskell.
> >
> >In partially I would like to see the following containers:
> >
> >Hash map, set, and bags which behave like arrays do.
> >Truly mutable hash map set and bags.
> >Truly mutable arrays and references.
> >Ordered map, set, and bags with efficient purely functional updates as
> >well as array style updates for efficiently updating a bunch of elements
> >at once.
> 
> Is not mutable taboo in Haskell, which is supposed to be dogmatically pure?

I thought that is was generally accepted that using trully mutable data
structures is OK as long as it is wrapped in a monade.

> However, however experimenting with C++ STL programming with a generic
> (dynamic) variable, I found that there is an interesting implementation of
> sets and maps, which may be suitable for a language like Haskell:
> 
> So one defines a global total order on the elements of all classes and
> instances, which then can be used to create maps and sets which are
> balanced trees, just as in C++ STL. This total order is normally different
> from any derivation of Ord, and is just used for sorting purposes.

How is this different.  Do you mean that some times the ordering is just
an ordering and as no meanings to humans like an alphabet order does?
-- 
Kevin Atkinson
[EMAIL PROTECTED]
http://metalab.unc.edu/kevina/


Reply via email to