chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] sequences egg


From: Felix
Subject: Re: [Chicken-users] sequences egg
Date: Sun, 21 Nov 2010 18:05:11 +0100 (CET)

From: John Cowan <address@hidden>
Subject: Re: [Chicken-users] sequences egg
Date: Sat, 20 Nov 2010 14:39:58 -0500

> Felix scripsit:
> 
>> > I don't see much point in the constructors, really.  Schemers already
>> > understand how to make lists and vectors.
>> 
>> Sorry, I don't understand this remark.
> 
> Ah.  I just assumed that random access sequences and linear access
> sequences were vectors and lists respectively, but looking at the code
> I see they aren't.  What advantages do they have?

They are intended to allow the user to define other types of sequences
(make-linear-sequence and make-random-access-sequence take a number
of procedures and so abstract away (hopefully) all direct access,
making them usable by the sequence operators).

> 
>> I know all these by heart.
> 
> I figured that, but a sequence library is useful in proportion to its
> richness, so I'd add more functions.

Ah, ok. I somehow would like to avoid a huge pile of procedures, though.
I find it very difficult to decide what is essential and what is trivial
(or what could be defined by simple combination of existing operators).
But you are right - the advantage of using such a library is both 
being able to use generic operators and also have a large collection
of "standard" operations readily available.

Thanks for the suggestion.


cheers,
felix



reply via email to

[Prev in Thread] Current Thread [Next in Thread]