> I feel like there should be a simpler way to do this, but I haven't found
> one despite much Googling and reading of docs about "for" and its siblings.
> Can someone point me the right way?
>
> I'd like to be able to iterate over a list N elements at a time -- e.g.,
> grab elements 1 and 2, do something with them, grab 3 and 4, etc.
>
> This will do the job, but I suspect there's a more built-in way:
>
> (define data '(("foo") ("bar")  ("baz")  ("jaz") ("quux") ("glug")))

racket/sequence provides an `in-slice` sequence to use with `for` forms:

https://docs.racket-lang.org/reference/sequences.html#%28def._%28%28lib._racket%2Fsequence..rkt%29._in-slice%29%29

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to