const withLog = (fn) => { return (...args) => { console.log(`calling ${fn.name}`); return fn(...args); }; };