{{alias}}( iterator, fcn[, offset[, eager]][, thisArg] ) Returns an iterator which steps according to a provided callback function. When invoked, the input function is provided four arguments: - value: iterated value. - i: input iteration index (zero-based). - n: output (strided) iteration index (zero-based). - curr: current stride. The return value of the input function specifies the next stride. If an environment supports Symbol.iterator and a provided iterator is iterable, the returned iterator is iterable. Parameters ---------- iterator: Object Input iterator. fcn: Function Stride function (i.e., a function which returns the step amount). offset: integer (optional) Index of the first iterated value. Default: 0. eager: boolean (optional) Boolean indicating whether to eagerly advance the input iterator when provided a non-zero offset. Default: false. thisArg: any (optional) Stride function execution context. Returns ------- iterator: Object Iterator. iterator.next(): Function Returns an iterator protocol-compliant object containing the next iterated value (if one exists) and a boolean flag indicating whether the iterator is finished. iterator.return( [value] ): Function Finishes an iterator and returns a provided value. Examples -------- > var arr = {{alias:@stdlib/array/to-iterator}}( [ 0, 1, 2, 3, 4, 5, 6 ] ); > function stride( v, i ) { return (i % 10)+1; }; > var it = {{alias}}( arr, stride ); > var r = it.next().value 0 > r = it.next().value 1 > r = it.next().value 3 See Also --------