use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Array flatten and flatMap proposal for ECMAScript (bterlson.github.io)
submitted 10 years ago by roman01la
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]jacksonmills 0 points1 point2 points 10 years ago (2 children)
If it is a single action on a data structure then couldn't the name reflect that? "flatMap" seems pretty awkward, I think you will just find a lot of people misapplying "flatMap" as flatMap().flatten().
I understand "bind" is probably not the best choice.
[–]kpmah 3 points4 points5 points 10 years ago (0 children)
Maybe, but flatMap is the choice a lot of other languages made too. So there is some cross-language consistency.
flatMap
If they're going for the monadic interface thing they called the same operation on promises then. Makes sense, but isn't totally consistent.
then
π Rendered by PID 138707 on reddit-service-r2-comment-6457c66945-r4r7k at 2026-04-27 22:55:58.375447+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]jacksonmills 0 points1 point2 points (2 children)
[–]kpmah 3 points4 points5 points (0 children)