@wycats might have an ideahttps://twitter.com/jacobrothstein/status/895758095640535040 …
-
-
To clarify, I'm also curious why Map and Set themselves didn't get .map, .reduce, .filter, etc, but got .forEach (which seems least useful)
1 reply 0 retweets 0 likes -
Replying to @jacobrothstein @jc00ke
I advocated for forEach as a transitional step when Maps had landed in browsers but not for/of.
2 replies 0 retweets 1 like -
Did the conversation in this thread just never get returned to? https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-11/nov-19.md … Lack of fp-style interface to collections seems odd
1 reply 1 retweet 1 like -
Replying to @jacobrothstein @jc00ke
I'm interested in pushing for flatMap to getting added to collections other than Array (an Array is proposed atm)
1 reply 0 retweets 0 likes -
flatMap on instances of Set/Map or their .entries()? What gets flattened? Personally would love reduce/filter/map on Set.proto & Map.proto
2 replies 0 retweets 0 likes -
(which could even behave identically to the equivalent methods after splatting into an Array)
1 reply 0 retweets 0 likes -
Replying to @jacobrothstein @jc00ke
Splatting onto an array means flatMap of Set produces array. Seems wrong.
1 reply 0 retweets 0 likes -
Thanks for explaining, this is a whole aspect I hadn't considered. What about reduce, which can be return type agnostic if 2nd arg is req'd
1 reply 0 retweets 0 likes -
…actually, regardless of 2nd arg, reduce makes no assumptions about return value, so should be less contentious?
1 reply 0 retweets 0 likes
Sure! reduce() is a nice primitive, as is flatMap. Neither seem that contentious to me, just work.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.