Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mvaldesdeleon/capital-c

Magically composable functions!
https://github.com/mvaldesdeleon/capital-c

Last synced: about 6 hours ago
JSON representation

Magically composable functions!

Awesome Lists containing this project

README

        

# capital-c

Magically composable functions!

```JS
const C = require('capital-c');

let f1 = x => x + 1;
let f2 = x => x * 2;

({f1, f2} = C({f1, f2}));

const y = f1.f2.f1.f2.f2.f1;

console.log(y);
console.log(y(2));
// Profit
```

# install
with [npm](https://npmjs.org) do:

```
npm install capital-c
```

# license

MIT