vec: add an external iterator