Re: for collection, take consecutive pairs incrementing by one

2008-08-26 Thread John
Perfect! Thanks On Aug 25, 9:22 pm, Rich Hickey <[EMAIL PROTECTED]> wrote: > On Aug 25, 9:16 pm, John <[EMAIL PROTECTED]> wrote: > > > For each element, get element and next element (incrementing index by > > one, not two), operate on the two, returning a new collection. > > There's the brute for

Re: for collection, take consecutive pairs incrementing by one

2008-08-25 Thread Rich Hickey
On Aug 25, 9:16 pm, John <[EMAIL PROTECTED]> wrote: > For each element, get element and next element (incrementing index by > one, not two), operate on the two, returning a new collection. > There's the brute force method, but I'm wondering if map or for or any > of their ilk can pull pairs at a

for collection, take consecutive pairs incrementing by one

2008-08-25 Thread John
For each element, get element and next element (incrementing index by one, not two), operate on the two, returning a new collection. There's the brute force method, but I'm wondering if map or for or any of their ilk can pull pairs at a time out of a collection, moving across the collection one el