```d mixin template NextToRange(ElementType) { ElementType _value; bool _haveValue; @property { bool empty() { return _haveValue; } ElementType front() { assert(_haveValue); return _value; } } void popFront() { _haveValue = nextValue(_value); } } ``` You don't need to break a large percentage of the standard library to use this ;)