Why is std.algorithm so complicated to use?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Jul 10 07:25:44 PDT 2012


On 7/10/12 8:27 AM, Simen Kjaeraas wrote:
> On Tue, 10 Jul 2012 09:04:31 +0200, Jonathan M Davis
> <jmdavisProg at gmx.com> wrote:
>
>> The problem is that map is lazy, so it can't be a random access range,
>
> Sure it can. If the underlying range is random-access or bidirectional,
> so can map be. What can't be (as easily) done is caching of elements.

Indeed map currently maps random-access ranges to random-access ranges.

Andrei




More information about the Digitalmars-d mailing list