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.

πŸ“‰ Falling 0.3x Programming Languages
3,172
Comments
20
Years Active
5
Top Authors
#8243
Topic ID

Activity Over Time

2007
4
2008
28
2009
35
2010
70
2011
141
2012
153
2013
168
2014
195
2015
188
2016
192
2017
261
2018
150
2019
272
2020
202
2021
305
2022
254
2023
245
2024
164
2025
142
2026
3

Keywords

ArrayList mixer.add lang.org method.map doc.rust FWIW i.e apple.peel bitbucket.org ListFExample.java map reduce filter array fn functions base fold function apple

Sample Comments

sim0n β€’ May 16, 2019 β€’ View on HN

Why is "map an array with a function" unintuitive but "filter an array with a function" isn't?

mehrdadn β€’ Jul 3, 2018 β€’ View on HN

I think you mean map/filter.

turtlebits β€’ Oct 18, 2017 β€’ View on HN

Looks cool, but I can't help but think that you're just reproducing what map() and filter() do, without any real benefits?

jasonhansel β€’ Sep 8, 2016 β€’ View on HN

An interesting idea, but don't the "map" and "flatMap" functions provide similar functionality?

masklinn β€’ Sep 17, 2023 β€’ View on HN

Using reduce to perform a map is a fun way to annoy colleagues.

junke β€’ Feb 13, 2016 β€’ View on HN

Why not? map, fold/reduce are not necessarily implemented as the textbook says.

Athas β€’ Jun 18, 2024 β€’ View on HN

You can just use 'map' explicitly. It doesn't have to be special syntax.

philwelch β€’ Sep 26, 2020 β€’ View on HN

Not who you’re responding to but from context I would assume map/filter, as he said.

Guthur β€’ Aug 28, 2020 β€’ View on HN

Come on, map and filter difficult? That's hyperbole of the highest order.

ushakov β€’ Jul 15, 2022 β€’ View on HN

for me it's lack of map/reduce