Maps an iterable through function f
f
// For every input value, multiply it by itselfmap([1, 2, 3], e => e*e)// Yields: 1, 4, 9 Copy
// For every input value, multiply it by itselfmap([1, 2, 3], e => e*e)// Yields: 1, 4, 9
It can also be used to transform types:
map([1, 2, 3], e => { value: e });// Yields: { value: 1 }, { value: 2 }, { value: 3 } Copy
map([1, 2, 3], e => { value: e });// Yields: { value: 1 }, { value: 2 }, { value: 3 }
Maps an iterable through function
f
It can also be used to transform types: