Can't recreate a range?
snarwin at gmail.com
Thu Apr 30 18:05:55 UTC 2020
On Thursday, 30 April 2020 at 16:21:05 UTC, Steven Schveighoffer
> I would say part of the issue is that you are doing all your
> work in front and not popFront.
> I'd say:
> 1. move your work to the popFront function (you then need to
> call popFront once before returning the range in your factory
> 2. change empty to check if the buffer is empty instead of the
Doing work in popFront instead of front is usually an
anti-pattern, since it forces eager evaluation of the next
element even when that element is never used. You should only do
this if there's no reasonable way to avoid it.
More information about the Digitalmars-d-learn