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

Dicebot public at dicebot.lv
Thu Oct 24 08:40:20 PDT 2013


On Thursday, 24 October 2013 at 15:36:59 UTC, Chris wrote:
> How do you define side effects? After all ranges manipulate, 
> reformat or restructure data.

They should do it in popFront. I'd consider any `front` that does 
anything but accessing cached value suspicious.


More information about the Digitalmars-d mailing list