We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Generate a parameter-reversed version of a function.
function reverse(x) // x: a function
const xasyncfn = require('extra-async-function'); function divide(x, y) { return x/y; } var fn = xasyncfn.reverse(divide); fn(2, 4); // → 2 fn(2, 6); // → 3 fn(2, 8); // → 4 var array = [1]; function push(...args) { array.push(...args); } var fn = xasyncfn.reverse(push); fn(2, 3, 4); // push(2, 3, 4) in reverse order array; // → [1, 4, 3, 2]