Skip to content

iterator

wolfram77 edited this page Mar 31, 2020 · 17 revisions

Gives iterator for iterable.

iterable.iterator(x);
// x: an iterable
const iterable = require('extra-iterable');

iterable.iterator([1, 2]);
// Iterator [1, 2]

iterable.iterator(new Set([1, 2]));
// Iterator [1, 2]

iterable.iterator([1, 2].values());
// Iterator [1, 2]

references

Clone this wiki locally