Creates a task converting each item into a new value.
Items are converted lazily, one at a time, and emitted in source order.
The type of input items
The type of output items
The function converting each item; an undefined result contributes nothing, so mapping doubles as filtering
undefined
A task yielding the values mapper converts the items into
mapper
await pipe( (items(1, 2, 3)) (map(n => n*2)) (toArray())); // [2, 4, 6] Copy
await pipe( (items(1, 2, 3)) (map(n => n*2)) (toArray())); // [2, 4, 6]
Creates a task converting each item into a new value.
Items are converted lazily, one at a time, and emitted in source order.