time-to-botec

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

repl.txt (961B)


      1 
      2 {{alias}}( iterator[, out][, mapFcn[, thisArg]] )
      3     Creates (or fills) an array from an iterator.
      4 
      5     When invoked, an input function is provided two arguments:
      6 
      7     - value: iterated value
      8     - index: iterated value index (zero-based)
      9 
     10     If provided an output array, the function fills the output array with
     11     iterated values.
     12 
     13     Iteration stops when an output array is full or an iterator finishes;
     14     whichever comes first.
     15 
     16     Parameters
     17     ----------
     18     iterator: Object
     19         Source iterator.
     20 
     21     out: ArrayLikeObject (optional)
     22         Output array-like object.
     23 
     24     mapFcn: Function (optional)
     25         Function to invoke for each iterated value.
     26 
     27     thisArg: any (optional)
     28         Execution context.
     29 
     30     Returns
     31     -------
     32     out: ArrayLikeObject
     33         Output array.
     34 
     35     Examples
     36     --------
     37     > var opts = { 'iter': 10 };
     38     > var arr = {{alias}}( {{alias:@stdlib/random/iter/randu}}( opts ) )
     39 
     40     See Also
     41     --------
     42