[plt-scheme] for.ss

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Thu Sep 20 12:52:37 EDT 2007

David Einstein wrote:
> I am glad to see that plt is considering including some comprehension 
> macros.  I realize that they are not yet final, but I have some comments.
> A) The behavior of in-range seems to have been inherited from srfi-42 
> and python.  In my opinion it is one of the few things that python gets 
> wrong.  If you assign problems 7 through 9 as homework to your students, 
> do you really expect them to hand back just problems 7 and 8?  (These 
> would be abstract ideal students.)

ad A)

Given a vector (or string or byte-string) v it common to iterate through 
the indices 0, 1, ... (- (vector-length v) 1). Convenience of the
common case therefore dictates the last index in the range to be

 > D)  A 'for*/seq'  form that takes a set of nested sequences and
 > returns a generator for all the values of the nested would be useful.
 > I've been trying to get one integrated into Jens' srfi-42 rewrite
 > using William Farr's multiple value yield, but my macro skills are not
 > yet up to the task.

ad D)

Do you have an example of the intended behaviour?

Jens Axel Søgaard

Posted on the users mailing list.