RFC: general sequences

Henning Thielemann lemming at henning-thielemann.de
Mon May 23 12:14:46 EDT 2005

On Mon, 23 May 2005, Ross Paterson wrote:

> On Mon, May 23, 2005 at 01:38:59PM +0200, Henning Thielemann wrote:
>>  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.
> What would that buy us?  I can't think of many useful functions that
> would use that interface, what with (<|) lazy for lists and strict for the
> other two, and (|>) cheap for sequences and expensive for the other two.

and more importantly (><) :-)

I remember there was some discussion on a generalised sequence type and 
some people wanted different implementations for String. So if the 
functions shared by Data.List, Data.Array, Data.Sequence are methods of 
one class everyone can easily switch between the types to choose the one 
which performs best.

More information about the Libraries mailing list