const thunkify = (fn) => (...args) => () => fn(...args); const logItems = pipe(unapply(identity), join(', '), console.log); const logger = thunkify(logItems)(1, 'foo', 6) logger()