Re: [racket-dev] [PATCH] add in-slice sequence

2011-12-16 Thread Vincent St-Amour
This looks useful to me. I think this belongs in `unstable/sequence' for now, with the other new sequence constructors. I'll merge it. Thanks for the patch! Vincent At Thu, 15 Dec 2011 22:47:44 -0500, David Vanderson wrote: I only got one comment (thanks John), so I'm resending for more

Re: [racket-dev] [PATCH] add in-slice sequence

2011-12-15 Thread David Vanderson
I only got one comment (thanks John), so I'm resending for more feedback. Is there any interest in adding this, or does everybody do it a better/different way? A more motivated example would be showing a list of products on a webpage in batches: (define products '(a b c d e f g))

[racket-dev] [PATCH] add in-slice sequence

2011-12-08 Thread David Vanderson
Hello, I was trying to write some code to process a few items at a time from a list. Nothing I came up with looked great, so I wrote an in-slice sequence function: (for/list ([e (in-slice 3 (in-range 8))]) e) '((0 1 2) (3 4 5) (6 7)) Patch below. Comments? Thanks, Dave diff --git