RFC: general sequences

Henning Thielemann lemming at henning-thielemann.de
Mon May 23 07:38:59 EDT 2005


On Mon, 23 May 2005, Ross Paterson wrote:

> A general implementation of sequences (based on work with Ralf Hinze)
> can be found at
>
> 	http://www.soi.city.ac.uk/~ross/software/html/Data.Sequence.html
> 	http://www.soi.city.ac.uk/~ross/software/Data/Sequence.hs
>
> Our experiments indicate that its performance is comparable to (and
> sometimes better than) the best known persistent implementations(*).
> Non-persistent implementations are typically faster, but you need to be
> more careful when using them.
>
> I'd like to propose this for base.
>
> Comments welcome.

  I like the prefix-free function names and the argument order, although 
I'd like even more if also the main type does not replicate the modules 
name, but is simply T instead of Seq. Then we could write
  import qualified Data.Sequence as Seq
   and use Seq.T as type.
  It would be great if we had a class for finite sequences with instances 
Data.List, Data.Array, Data.Sequence. Maybe the new identifiers (<|), (|>) 
and so on should be names of methods of a such a class instead of separate 
functions.


More information about the Libraries mailing list