Fundot Partial
Partial application composer for the functional library Fundot
Example
var partial = require('fundot-partial')
var say = function (name, says) {
return name + ' says ' + says
}
var chuckSays = partial.left(say, 'Chuck')
console.log(chuckSays('hello'))
var sayHello = partial.right(say, 'hello')
console.log(sayHello('Bob'))
$ node example/partial.js
Chuck says hello
Bob says hello
Methods
var partial = require('fundot-partial')
partial.left(function, arguments)
Composes partial application using the function passed as the first argument. Other arguments given will be stored and placed on the left of any arguments given to the partial application returned.
partial.right(function, arguments)
Composes partial application using the function passed as the first argument. Other arguments given will be stored and placed on the right of any arguments given to the partial application returned.
Install
With npm do:
npm install fundot-partial
License
MIT