repl.txt (974B)
1 2 {{alias}}( iterator ) 3 Returns an iterator which computes the cosine of each iterated value times 4 π. 5 6 Computes cos(πx) more accurately than cos(pi*x), especially for large x. 7 8 If an environment supports Symbol.iterator and a provided iterator is 9 iterable, the returned iterator is iterable. 10 11 Parameters 12 ---------- 13 iterator: Object 14 Input iterator. 15 16 Returns 17 ------- 18 iterator: Object 19 Iterator. 20 21 iterator.next(): Function 22 Returns an iterator protocol-compliant object containing the next 23 iterated value (if one exists) and a boolean flag indicating whether the 24 iterator is finished. 25 26 iterator.return( [value] ): Function 27 Finishes an iterator and returns a provided value. 28 29 Examples 30 -------- 31 > var it = {{alias}}( {{alias:@stdlib/random/iter/randu}}() ); 32 > var r = it.next().value 33 <number> 34 > r = it.next().value 35 <number> 36 37 See Also 38 -------- 39