Currently there is no way to wrap an iterator into a RefIterator in a natural way. An iterator that has no impure arguments or sideeffects can only be treated as an Iterator. There should be a way to label a pure Iterator returning function as one returning RefIterator.