protocol for using InputRanges

monarch_dodra monarchdodra at gmail.com
Tue Mar 25 15:56:44 PDT 2014


On Tuesday, 25 March 2014 at 22:54:14 UTC, Timon Gehr wrote:
> On 03/25/2014 10:29 PM, Andrei Alexandrescu wrote:
>>
>>> B) I want to be able to call front multiple times in a row, 
>>> and expect
>>> to get the same value.
>>
>> Correct.
>
> 'map' may fail this criterion. In this case, is the blame put 
> on the user?

Depends how you define "same" though :/ But yeah.

Also, shameless plug about my "cache" range adaptor:
https://github.com/D-Programming-Language/phobos/pull/1364


More information about the Digitalmars-d mailing list