Travis build: 1705

This commit is contained in:
30secondsofcode
2020-01-13 08:19:45 +00:00
parent bd80172f4d
commit 164fad4f5e
19 changed files with 199 additions and 228 deletions

View File

@ -7,11 +7,11 @@ Given a key and a set of arguments, call them when given a context. Primarily us
Use a closure to call a stored key with stored arguments.
```js
```js
const call = (key, ...args) => context => context[key](...args);
```
```js
```js
Promise.resolve([1, 2, 3])
.then(call('map', x => 2 * x))
.then(console.log); // [ 2, 4, 6 ]