How is chunkBy supposed to behave on copy

Steven Schveighoffer schveiguy at gmail.com
Thu Mar 19 14:11:20 UTC 2020


On 3/19/20 10:00 AM, Dukc wrote:
> On Wednesday, 18 March 2020 at 16:29:53 UTC, H. S. Teoh wrote:
>> This is a dangerous assumption.  My personal advice is, if you expect 
>> a range to retain its contents after iteration, call .save explicitly. 
>> Don't assume anything not explicitly required by the range API.
> 
> This means that even if the api does thing X right now, I should not 
> assume it won't change unless it's documented, right?

If you want to copy a forward range use save. Anything else is possible 
to break in an implementation detail later.

-Steve


More information about the Digitalmars-d mailing list