* Like Array.map(). * * @param {(v: any) => any} fn - Value transformation function. * @returns {Stream} A new Stream that yields this Stream's values, transformed by `fn`.
(fn:Function)
| 128 | * @returns {Stream} A new Stream that yields this Stream's values, transformed by `fn`. |
| 129 | */ |
| 130 | map(fn:Function) { return new Stream((function* () { // @ts-ignore |
| 131 | for (const v of this) yield fn(v); }).call(this)); } |
| 132 | |
| 133 | /** |
| 134 | * Implements the JavaScript iterable protocol. |
no outgoing calls