UNPKG
uinix-fp-map
Version:
latest (1.0.0)
1.0.0
uinix fp array map utility
uinix-js/uinix-fp
uinix-fp-map
/
index.js
11 lines
(9 loc)
•
190 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
export
{map};
/** * Maps an array using the provided mapper. * *
@template
X, Y *
@param
{
(x: X) => Y
} f mapper *
@returns
{
(xs: X[]) => Y[]
} */
const
map
= (
f
) =>
(
xs
) =>
xs.
map
(f);