fluent-pointfree
v0.1.1
Published
[![](https://travis-ci.org/ccorcos/fluent-pointfree.svg?branch=master)](https://travis-ci.org/ccorcos/fluent-pointfree)
Downloads
3
Readme
Fluent Pointfree
This project is a little experiment using ES6 Proxy to create pointfree functions using a fluent interface.
You can install from NPM:
npm install --save fluent-pointfree
Then you can create functions like this:
import pointfree from 'fluent-pointfree'
// pointfree is just the identity function
pointfree(10) // => 10
// but you can chain on it to build up a computation
const sumEven = pointfree
.filter(x => x % 2 == 0)
.reduce((a, b) => a + b, 0)
sumEven([1, 2, 3, 4]) // => 6
Warning: The only problem with using this project in production is that it requires ES6 Proxy which is relatively new and only supported by the latest browsers.
More Reading: If you think this is a neat project, here are a couple resources you might also find interesting: