https://github.com/maxmellon/compositter
A library provide the higher-order function.
https://github.com/maxmellon/compositter
Last synced: about 1 year ago
JSON representation
A library provide the higher-order function.
- Host: GitHub
- URL: https://github.com/maxmellon/compositter
- Owner: MaxMEllon
- License: mit
- Created: 2018-02-15T08:05:03.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-18T13:45:26.000Z (over 8 years ago)
- Last Synced: 2025-02-13T17:16:01.859Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
compositter
---
A library provide a [higher-order function](https://en.wikipedia.org/wiki/Higher-order_function) in javascript.
About
---
F# provide the `>>` operator. `>>` operator is able to generate higher-order function.
I want to simulate `>>` operator in javascript.
- in fsharp
```fsharp
let function1 x = x + 1
let function2 x = x * 5
let f = function1 >> function2
f(10) //=> 55
```
- in javascript
```javascript
const compositter = require('compositter')
const function1 = x => x + 1
const function2 = x => x * 5
const f = compositter([function1, function2])
f(10) //=> 55
```
LICENSE
---
[MIT](./LICENSE.txt)