fundot-partial

0.0.1 • Public • Published

Fundot Partial

Partial application composer for the functional library Fundot

build status

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

/fundot-partial/

    Package Sidebar

    Install

    npm i fundot-partial

    Weekly Downloads

    4

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • chapel