Map/Filter/Reduce Functions
Discussions debate the intuitiveness, utility, and implementations of higher-order array methods like map, filter, and reduce across languages such as JavaScript, Rust, Go, and Haskell, often comparing them to alternatives or questioning their necessity.
Activity Over Time
Top Contributors
Keywords
Sample Comments
Why is "map an array with a function" unintuitive but "filter an array with a function" isn't?
I think you mean map/filter.
Looks cool, but I can't help but think that you're just reproducing what map() and filter() do, without any real benefits?
An interesting idea, but don't the "map" and "flatMap" functions provide similar functionality?
Using reduce to perform a map is a fun way to annoy colleagues.
Why not? map, fold/reduce are not necessarily implemented as the textbook says.
You can just use 'map' explicitly. It doesn't have to be special syntax.
Not who youβre responding to but from context I would assume map/filter, as he said.
Come on, map and filter difficult? That's hyperbole of the highest order.
for me it's lack of map/reduce