On Tuesday, 18 August 2015 at 19:37:47 UTC, Joseph Rushton Wakeling wrote:

Yes, broadly like your example, although note that your version won't handle multiple popFront() calls in succession without any .front call in-between.

Good point! And you show acceptable solution.

The last your example I prefer to parametrize with alias to functions:

```d
mixin template LazyPopFront(alias frontImplementation, alias popFrontImplementation)
...
```
It gives more flexibility.


One that worries me, if someone start to make odd things like create shared instance of this range.


Reply via email to