const revert = f => (...arg) => -f(...arg); const f = (a, b) => a * b; const x = revert(f); const temp = [f(4,5), x(4,5)]; alert(temp);