[plt-dev] Some additions

From: Carl Eastlund (carl.eastlund at gmail.com)
Date: Sun Apr 5 23:23:48 EDT 2009

On Sun, Apr 5, 2009 at 10:07 PM, Eli Barzilay <eli at barzilay.org> wrote:
>
> * `in-cycle' -- similar to `in-sequences', but the sequences are
>  repeated in an infinite loop.  Note that unlike Sam's version this
>  does not cache the values -- it looks to me like a dangerous
>  implicit behavior when you can achieve it explicitly by collecting
>  the list first explicitly.  For example, to cycle a file's contents
>  you can read it first with `file->bytes'.

That greatly changes the behavior of in-cycle, Eli.  First of all, it
means every imperative sequence needs to come with a list- or
vector-generating version to do manual caching.  Secondly, it means
imperative sequences have no way of doing on-demand in-cycle: the
whole sequence will be read before processing the elements, instead of
reading elements one at a time.  Third, there will be no way to run
in-cycle on potentially infinite imperative sequences, even though it
would be nice to have the behavior of "process as long as there's
something new, or loop if there's not".

My vote is for caching in-cycle.

--Carl


Posted on the dev mailing list.