Share your code. Components are building blocks, you are the architect.

utils/o
v1.1.0
1.1.0
1.0.0
MIT
PUBLIC
3
1     DEPENDENCIES
Build: fail
BuildFail
Build Status: fail
`o` is a curried composition function that returns a unary function

Please configure Bit as a scoped registry to install components with NPM.Learn more

npm config set '@bit:registry' https://node.bitsrc.io
Use utils/o in your project
npm i @bit/bit.ramda.utils.o
Copied

o (f:Function, g:Function) : Function

o is a curried composition function that returns a unary function. Like compose, o performs right-to-left function composition. Unlike compose, the rightmost function passed to o will be invoked with only one argument. Also, unlike compose, o is limited to accepting only 2 unary functions. The name o was chosen because of its similarity to the mathematical composition operator ∘.

Example

var classyGreeting = name => "The name's " + name.last + ", " + name.first + " " + name.last
     var yellGreeting = R.o(R.toUpper, classyGreeting);
     yellGreeting({first: 'James', last: 'Bond'}); //=> "THE NAME'S BOND, JAMES BOND"

     R.o(R.multiply(10), R.add(10))(-4) //=> 60

Arguments

f: Function

g: Function

Returns

Function