std.range.cacheFront proposal&working code: wraps a range to enforce front is called only once

Dicebot public at dicebot.lv
Fri Oct 25 04:57:12 PDT 2013


On Friday, 25 October 2013 at 06:38:00 UTC, Timothee Cour wrote:
> why make user reimplement the wheel each time with a custom 
> range when a
> generic solution (such as above, maybe could be improved) works 
> ?

Because it does not fit current range algorithm design and alien 
nature of such code should be as explicit as possible.


More information about the Digitalmars-d mailing list