D Cookbook range save question

mark mark at qtrac.eu
Thu Jan 30 10:32:58 UTC 2020


On Thursday, 30 January 2020 at 10:31:08 UTC, mark wrote:
> In the D Cookbook it has as part of the FibonacciRange example:
>
> @property FibonacciRange save() { return this; }
>
> And in the description it says:
>
> "...save, which returns a new range that is a copy of the 
> current range and can be advanced independently..."
>
> Why is this a *copy*? (For a copy (in C++) I'd have expected 
> return *this.)

Oh, I understand now...

Sorry for the noise but I don't know how to delete a premature 
post!


More information about the Digitalmars-d-learn mailing list