repl.txt (1467B)
1 2 {{alias}}( iter0, ...iterator ) 3 Returns an iterator which performs element-wise division of two or more 4 iterators. 5 6 The length of the returned iterator is equal to the length of the shortest 7 provided iterator. In other words, the returned iterator ends once *one* of 8 the provided iterators ends. 9 10 If provided a numeric value as an iterator argument, the value is broadcast 11 as an infinite iterator which always returns the provided value. 12 13 If an environment supports Symbol.iterator and provided iterators are 14 iterable, the returned iterator is iterable. 15 16 Parameters 17 ---------- 18 iter0: Object 19 Input iterator. 20 21 iterator: ...Object 22 Iterators whose values are used as divisors. 23 24 Returns 25 ------- 26 iterator: Object 27 Iterator. 28 29 iterator.next(): Function 30 Returns an iterator protocol-compliant object containing the next 31 iterated value (if one exists) and a boolean flag indicating whether the 32 iterator is finished. 33 34 iterator.return( [value] ): Function 35 Finishes an iterator and returns a provided value. 36 37 Examples 38 -------- 39 > var it1 = {{alias:@stdlib/array/to-iterator}}( [ 3.0, 2.0 ] ); 40 > var it2 = {{alias:@stdlib/array/to-iterator}}( [ 1.0, 4.0 ] ); 41 > var it = {{alias}}( it1, it2 ); 42 > var v = it.next().value 43 3.0 44 > v = it.next().value 45 0.5 46 > var bool = it.next().done 47 true 48 49 See Also 50 -------- 51