@stdlib/math
Version: 
Standard math.
42 lines (31 loc) • 914 B
Plain Text
{{alias}}( [options] )
    Returns an iterator which generates a sequence of squares.
    If an environment supports Symbol.iterator, the returned iterator is
    iterable.
    Parameters
    ----------
    options: Object (optional)
        Function options.
    options.iter: integer (optional)
        Number of iterations. Default: 94906265.
    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 it = {{alias}}();
    > var v = it.next().value
    0
    > v = it.next().value
    1
    > v = it.next().value
    4
    See Also
    --------