std.range.cacheFront proposal&working code: wraps a range to enforce front is called only once
deadalnix
deadalnix at gmail.com
Thu Oct 24 12:10:58 PDT 2013
On Thursday, 24 October 2013 at 17:57:54 UTC, Jonathan M Davis
wrote:
> Now, that being said, I'd argue that map should probably be
> changed so that it
> calls its function on popFront rather than front (though that
> has the downside
> of requiring that it then hold the current value, which it
> doesn't currently
> have to do), but regardless, you're using map for something
> other than what it
> was designed to do.
That would break random access.
More information about the Digitalmars-d
mailing list