September 14, 2015
On Monday, 14 September 2015 at 05:37:05 UTC, Sebastiaan Koppe wrote:
> What about using zip and a slice?

Slicing requires a RandomAccessRange (Array). This is too restrictive. We want to change operations such as adjacentTuples with for example map and reduce without the need for temporary copies of the whole range. This is the thing about D's standard library.

Read up on D's range concepts.
September 14, 2015
On Monday, 14 September 2015 at 10:45:52 UTC, Per Nordlöw wrote:
> restrictive. We want to change operations such as

Correction:

We want to *chain* operations such as...
September 15, 2015
On Monday, 14 September 2015 at 10:45:52 UTC, Per Nordlöw wrote:
> On Monday, 14 September 2015 at 05:37:05 UTC, Sebastiaan Koppe wrote:
>> What about using zip and a slice?
>
> Slicing requires a RandomAccessRange (Array). This is too restrictive. We want to change operations such as adjacentTuples with for example map and reduce without the need for temporary copies of the whole range. This is the thing about D's standard library.
>
> Read up on D's range concepts.

dropOne then.

I saw your adjacentTuples. Two questions:

a) can't you use a ringbuffer instead of copy when N > 2?
b) shouldn't front() return a range over that ringbuffer?
1 2
Next ›   Last »