/array/map
stdMaps the given array with the given functions.
Type signature
(...fs: ((x: any) => any)[]) => (xs: any) => any
Examples
map((x) => x * x)([1, 2, 3]);
// ⇒ [1, 4, 9]
Try in REPL
map(
(x) => x * x,
(x) => x + 1
)([1, 2, 3]);
// ⇒ [2, 5, 10]
Try in REPL
Questions
- How to map an array?