Y
Hacker News
new
|
ask
|
show
|
jobs
by
aaronm67
4719 days ago
In Underscore, you can do something like:
_([ ... ]).map( ... ).filter( ... ).value()
It's not exactly extending the native array...but there are far fewer side effects to doing it this way.
1 comments
WickyNilliams
4719 days ago
The problem with this is that it's doing multiple iterations. LINQ on the other hand builds up an expression tree that is "compiled" into a single loop when `ToList()` (or some other method which gets the results) is eventually called.
link