Hacker News new | ask | show | jobs
by benp84 2596 days ago
I hear this complaint a lot but I find those argument orders completely intuitive.

You filter (1) an array with (2) a function. You map (1) a function over (2) an array. You reduce (1) an array with (2) a function.

It follows exactly what I'm thinking when I type it. To reverse the orders would be, what? "Mapping an array with a function?" "Filter a function on an array?"

3 comments

Why is "map an array with a function" unintuitive but "filter an array with a function" isn't?
This sounds a lot like the arguments used in favor of Perl 5 sigils.
Precisely. Not sure what the fuss is about.