Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/adhityaramadhanus/curryjs

Simple naive currying library in js
https://github.com/adhityaramadhanus/curryjs

Last synced: 12 days ago
JSON representation

Simple naive currying library in js

Awesome Lists containing this project

README

        

[![Build Status](https://travis-ci.org/AdhityaRamadhanus/curryjs.svg?branch=master)](https://travis-ci.org/AdhityaRamadhanus/curryjs)

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
-----

```js
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]