re: Human Readable JavaScript VIEW POST

TOP OF THREAD FULL DISCUSSION
re: The default behaviour of Array.map is unintuitive given that it returns the index and the original array as the second and third arguments to the c...

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!)

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

code of conduct - report abuse