Giter Club home page Giter Club logo

fluent-pointfree's Introduction

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:

fluent-pointfree's People

Contributors

ccorcos avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fluent-pointfree's Issues

the frisby videos were primarily fluent...

but isn't the goal primarily pointfree lol?

My goal has been to drop the fluent style. But I'm only just beginning to level up to the fantasy land stage :)

Why is it fluent syntax something you may wanna use with fantasy land types and functions? Is it not possible to go completely point-free there?

i thought my fluent days of chaining functions were over. Enlighten me brotha!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.