curryjs

0.1.0 • Public • Published

Build Status

CurryJs

Installation | Usage | License

Simple, naive, small library for currying function composing and curry are two important technique in functional programming, you can build more functions from these

Installation

npm install curryjs

Usage

var curryJs = require('curryjs')
var composeJs = require('composejs')
var split = curryJs(function (delim, str) { return str.split(delim)})
var join = curryJs(function (delim, arr) { return arr.join(delim)})
var map = curryJs(function (fn, arr) { return arr.map(fn)})
var toLowerCase = Function.prototype.call.bind(String.prototype.toLowerCase)
var composed = composeJs(join(' '), map(toLowerCase), split(' '))
composed('Hello World') // hello world

License

MIT © [Adhitya Ramadhanus]

Package Sidebar

Install

npm i curryjs

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • evmap