Do we really need to work solely in terms of iterators? If the memory consumption is reasonable, using lists would be clearer.