Update over.md

This commit is contained in:
Angelos Chalaris
2020-01-13 10:07:13 +02:00
committed by GitHub
parent 16e9a50eab
commit 6e66a65f46

View File

@ -1,6 +1,6 @@
--- ---
title: over title: over
tags: adapter,function,intermediate tags: function,intermediate
--- ---
Creates a function that invokes each provided function with the arguments it receives and returns the results. Creates a function that invokes each provided function with the arguments it receives and returns the results.
@ -14,4 +14,4 @@ const over = (...fns) => (...args) => fns.map(fn => fn.apply(null, args));
```js ```js
const minMax = over(Math.min, Math.max); const minMax = over(Math.min, Math.max);
minMax(1, 2, 3, 4, 5); // [1,5] minMax(1, 2, 3, 4, 5); // [1,5]
``` ```