Example 1 — Official Power, Negate, Increment
The first step takes two arguments; the rest take one. This is the sample from the Ramda docs.
const f = R.pipe(Math.pow, R.negate, R.inc);
console.log(f(3, 4)); // -80 How It Works
- First step.
Math.pow(3, 4)receives both arguments →81. - Second step.
R.negateflips the sign →-81. - Third step.
R.incadds 1 →-80. - Read it in order. The functions run exactly as written, left to right.
