[m-dev.] New datatype: rope

Peter Schachte schachte at csse.unimelb.edu.au
Thu Nov 11 12:55:27 AEDT 2010


On 11/11/10 12:27, Paul Bone wrote:

> Does anyone see any problem with this idea or a simpler implementation?

No problem with it, but how about generalising it by allowing segments of the
rope to be made of any instance of a sequence type class?  Then you could make
a rope from separate bits of strings, arrays, lists, substrings, basically
anything you have lying around that somehow implements a sequential collection
of homogeneous things?  I'm not sure what the best set of methods for the type
class are, but something equivalent to CAR, CDR, CONS and NIL.


-- 
Peter Schachte              Economists are like Aeolian harps, and the
University of Melbourne     sounds that issue from them are determined by
schachte at unimelb.edu.au     the winds that blow.
www.cs.mu.oz.au/~schachte/      -- Rebecca West
Phone: +61 3 8344 1338
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the developers mailing list