From: Alan Post <[email protected]> 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 Could you provide examples for `chain', `pairwise' and `repeat'? > 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. Good points. How would you express that operationally? cheers, felix _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
