Map each item in the iterator.
import { pipe } from "yta";import { map, of, toArray } from "yta/async";await pipe( of(0, 1, 2), map((x) => x * 2),);// => [0, 2, 4] Copy
import { pipe } from "yta";import { map, of, toArray } from "yta/async";await pipe( of(0, 1, 2), map((x) => x * 2),);// => [0, 2, 4]
See also:
The input type
The output type
The mapping function
Map each item in the iterator.
See also: