2 ms·
You can define a debug version: const pipe_debug = (...args) => args.reduce((prev, curr) => { console.log('pipe debug; curr:', curr, ', prev:', prev)
by djedr 9y ago
You can define a debug version:
const pipe_debug = (...args) => args.reduce((prev, curr) => {
console.log('pipe debug; curr:', curr, ', prev:', prev)
return curr(prev)
})
and when you want to see intermediate results of a `pipe` call, you append `_debug` to the name.