[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] sequences egg
From: |
Alan Post |
Subject: |
Re: [Chicken-users] sequences egg |
Date: |
Thu, 18 Nov 2010 08:37:35 -0700 |
On Thu, Nov 18, 2010 at 10:03:44AM -0500, Felix wrote:
> Hello!
>
>
> I've put together a little library of generic "sequence" operations,
> and would like to get some feedback, since I'm not sure about the
> nomenclature and API. Find it here:
>
> http://wiki.call-cc.org/eggref/4/sequences
>
> And in the repo, usual place. It has a test-suite, but surely contains
> some bugs, and is a bit of a test for the "fast-generic" extension.
>
> Comments, suggestions, rants or critique is welcome.
>
> (I think it needs a very recent chicken, but am not quite sure,
> it may work with older versions)
>
When I write programs with iterators, I find myself using:
map
zip/unzip
chain
remove/filter
nearly every time. I use:
tee (copy)
pairwise
count
repeat
A fair bit, and I use:
product
flatten
from time to time. These might be known in scheme under different
names, I appologize for not localizing.
One thing I notice missing is that you have linear-sequence and
random-access-sequence, but what about something like a pipe, which
is a linear-sequence with (say) the additional constraint of only
being able to traverse it once? Similarly, if you had a routine
like repeat, it is a linear-sequence that is non-finite.
-Alan
--
.i ko djuno fi le do sevzi