structs-compose

0.0.1 • Public • Published

structs-compose

Build Status NPM version Dependency Status License Test coverage Js Standard Style

Function composition.

Function Composition

Composing any number of functions is a chaining process in which the output of a function gets passed to the next function and so on until a final output is produced.

f(data) -> modified data -> g(modified data) -> ...

Installation

$ npm install structs-compose

Example

var times2plus1 = compose(plus1, times2)
// times2plus1(3) -> 7
 
function plus1 (x) {
  return x + 1
}
 
function times2 (x) {
  return x * 2
}

Usage

Documentation is available here.

Tests

$ npm test

License

MIT

Package Sidebar

Install

npm i structs-compose

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • queckezz