flip

v0.9.6arrow_drop_down
v0.9.6
STATUS
Passing
DOWNLOADS
5
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
1 KB
Returns a new function much like the supplied one, except that the first two arguments' order is reversed.
1 contributor
Install flip as a package?
Copied
npm i @bit/justin-capalbo.ramda.flip
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right
flip (
fn:Function
) : *

Returns a new function much like the supplied one, except that the first two arguments’ order is reversed.

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

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

     R.flip(mergeThree)(1, 2, 3); //=> [2, 1, 3]
Argument
fn: Function

The function to invoke with its first two parameters reversed.

Returns
*

The result of invoking `fn` with its first two parameters' order reversed.

Help and resources