3 ms·
Interesting question. I share this train of thought. When I restarted writing JavaScript (thank god with TypeScript ;)) and I realized filter/map/reduce array m
by oaiey 7y ago
Interesting question. I share this train of thought. When I restarted writing JavaScript (thank god with TypeScript ;)) and I realized filter/map/reduce array methods, my fear of lacking LINQ vanished away. Reduce is painful in the beginning (because it is different to SQL's GroupBy) but it is a foundation for so much more (once you REALLY understand it).
Some more helpers are useful (first, last, max, take, skip ... all with variation). They should added to the core language.
- jolux 7y agoLinq has Reduce as well, known as Aggregate (foldr/foldl in most functional languages).