WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

fp-js/fj-flip

Repository files navigation

fj-flip

Build Status npm version

Given a function, returns a new function with the first two arguments flipped.

Installation

npm install fj-flip --save

Usage

var flip = require('fj-flip');

var mergeThree = (a, b, c) =>  ([]).concat(a, b, c);

mergeThree(1, 2, 3); //=> [1, 2, 3]

flip(mergeThree)(1, 2, 3); //=> [2, 1, 3]

About

Given a function, returns a new function with the first two arguments flipped.

Resources

License

Stars

Watchers

Forks

Packages

No packages published