[Issue 13958] RangeError with impure map
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Jan 11 04:23:01 PST 2015
https://issues.dlang.org/show_bug.cgi?id=13958
Peter Alexander <peter.alexander.au at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |peter.alexander.au at gmail.co
| |m
--- Comment #2 from Peter Alexander <peter.alexander.au at gmail.com> ---
This isn't a bug. You cannot make assumptions about how many times joiner will
call .front. Since map is a forward range, you cannot assume that joiner will
only iterate once. Like bearophile, I would highly recommend using pure
functions with map.
--
More information about the Digitalmars-d-bugs
mailing list