time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

repl.txt (1455B)


      1 
      2 {{alias}}( src[, mapFcn[, thisArg]] )
      3     Returns an iterator which iterates over the elements of an array-like
      4     object.
      5 
      6     When invoked, an input function is provided three arguments:
      7 
      8     - value: iterated value
      9     - index: iterated value index
     10     - src: source array-like object
     11 
     12     If an environment supports Symbol.iterator, the returned iterator is
     13     iterable.
     14 
     15     If an environment supports Symbol.iterator, the function explicitly does not
     16     not invoke an array's `@@iterator` method, regardless of whether this method
     17     is defined. To convert an array to an implementation defined iterator,
     18     invoke this method directly.
     19 
     20     Parameters
     21     ----------
     22     src: ArrayLikeObject
     23         Array-like object from which to create the iterator.
     24 
     25     mapFcn: Function (optional)
     26         Function to invoke for each iterated value.
     27 
     28     thisArg: any (optional)
     29         Execution context.
     30 
     31     Returns
     32     -------
     33     iterator: Object
     34         Iterator.
     35 
     36     iterator.next(): Function
     37         Returns an iterator protocol-compliant object containing the next
     38         iterated value (if one exists) and a boolean flag indicating whether the
     39         iterator is finished.
     40 
     41     iterator.return( [value] ): Function
     42         Finishes an iterator and returns a provided value.
     43 
     44     Examples
     45     --------
     46     > var it = {{alias}}( [ 1, 2, 3, 4 ] );
     47     > var v = it.next().value
     48     1
     49     > v = it.next().value
     50     2
     51 
     52     See Also
     53     --------
     54