Returns an OperationFunction that yields elements from the source transformed by the mapper.
Type of items in the source.
Type of items in the result.
Function to transform elements.
An OperationFunction that yields elements from the source transformed by the mapper.
const result = map((x) => x * 2)([1, 2, 3]);console.log([...result]); // [2, 4, 6] Copy
const result = map((x) => x * 2)([1, 2, 3]);console.log([...result]); // [2, 4, 6]
Returns an OperationFunction that yields elements from the source transformed by the mapper.