time-to-botec

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

repl.txt (1125B)


      1 
      2 {{alias}}( iterator )
      3     Returns an iterator which iteratively computes a cumulative mid-range.
      4 
      5     The mid-range is the arithmetic mean of maximum and minimum values.
      6     Accordingly, the mid-range is the midpoint of the range and a measure of
      7     central tendency.
      8 
      9     If an environment supports Symbol.iterator, the returned iterator is
     10     iterable.
     11 
     12     Parameters
     13     ----------
     14     iterator: Object
     15         Input iterator.
     16 
     17     Returns
     18     -------
     19     iterator: Object
     20         Iterator.
     21 
     22     iterator.next(): Function
     23         Returns an iterator protocol-compliant object containing the next
     24         iterated value (if one exists) and a boolean flag indicating whether the
     25         iterator is finished.
     26 
     27     iterator.return( [value] ): Function
     28         Finishes an iterator and returns a provided value.
     29 
     30     Examples
     31     --------
     32     > var arr = {{alias:@stdlib/array/to-iterator}}( [ 2.0, -5.0, 3.0, 5.0 ] );
     33     > var it = {{alias}}( arr );
     34     > var v = it.next().value
     35     2.0
     36     > v = it.next().value
     37     -1.5
     38     > v = it.next().value
     39     -1.0
     40     > v = it.next().value
     41     0.0
     42 
     43     See Also
     44     --------
     45