OpenBox - A collection of simple funcational tools for everyday programming use
This project is currently a fun way for me to solidify my knowledge of functional programming in JS, testing and documentation writing. That being said, it's limited feature set production ready and being used in Proovi.io;
It is based off the material from Brian Lonsdorf's excellent tutorial series on egghead.io. Along with help from Chet Harrison's A Gentle Introduction to Functional JavaScript.
I've been writing notes about my experience learning FP in JS in the Wiki of this project.
This project follows the Fantasy Land spec.
- Box (functor)
- ap method (apply)
- of method (applicative)
- Further tests needed
- chain method (chain)
- Either
- Todo...
First things first, install using your favorite package manager:
$ yarn add open-box
or npm install --save open-box
// Import your container from OpenBox
import { Box } from 'open-box';
// Put something in a box
const myBox = new Box(1);
// Start applying functions to your values
const newBox = myBox.map(x => x + 1);
$ yarn build-all
$ yarn test
- Brian Lonsdorf (@drboolean)
- Chet Harrison (@chetharrison)
- ES6 Library Minimal starter kit
- Functors, Applicatives, And Monads In Pictures
MIT