first iterator
second iterator
subsequent iterators
iterator
var array2iterator = require( `@stdlib/array/to-iterator` );
var it1 = array2iterator( [ 3.0, 4.0 ] );
var it2 = array2iterator( [ 1.0, 8.0 ] );
var iter = iterMod( it1, it2 );
var v = iter.next().value;
// returns 0.0
v = iter.next().value;
// returns 4.0
var bool = iter.next().done;
// returns true
Returns an iterator which performs an element-wise modulo operation of two or more iterators.
Notes
NaN
), the returned iterator returnsNaN
. If non-numeric iterated values are possible, you are advised to provide an iterator which type checks and handles non-numeric values accordingly.Symbol.iterator
and all provided iterators are iterable, the returned iterator is iterable.must provide two or more iterators
must provide iterator protocol-compliant objects