Iterator abstraction based on ES6 specification