Point-free style defines functions without explicitly mentioning their arguments.
It relies on composition and partial application.
// pointful — argument x is mentioned explicitly
const double = x => x * 2;
const doubleAll = arr => arr.map(x => double(x));
// point-free — no explicit argument
const double = x => x * 2;
const doubleAll = arr => arr.map(double); // or: map(double)Refactor the given pointful functions into point-free style using the provided helpers.
All functions should produce identical results.
Sample tests