DEV Community

Discussion on: Human Readable JavaScript

crosseye profile image
Scott Sauyet

But why include index and originalArray parameters when you don't use them?

For that matter, why not make this point-free?

const map = (f) => (xs) => xs .map ((x) => f(x))

(... and around in circles we go!)

Thread Thread
puiutucutu profile image

That's true, they are superfluous - I left those other args there to make it clearer how the args are moving around.