3 ms·
> picked up most of the ML featureset It really hasn't. In this very post he had to use a visitor to work around the fact that switch isn't an expression. Jav
by IshKebab 3y ago
> picked up most of the ML featureset
It really hasn't. In this very post he had to use a visitor to work around the fact that switch isn't an expression.
JavaScript's support for iterators is also weirdly shit. It has `.map()` but that only works on arrays. You can't map an iterator!
- andyferris 3y agoI think there’s an iterator proposal out there for JS with generic map, filter, etc.
- bakkoting 3y agoYou can now! The iterator helpers proposal is stage 3 and shipping in Chrome. (new Set([0, 1, 2])).values().map(x => x + 1).toArray() You can also reduce, filter, find, etc.