News for hackers. Stuff that matters.
Re:Magical, Mystical JavaScript Transducers by SigmundA on Saturday June 29, 2019 @07:30AM (#20311984)
I am somewhat confused here, I primarily do C# so I am used to IEnumerable and Linq for doing this kind of stuff and you would just do .Where().Select().Average() without worrying about intermediate memory usage. In C# you do this stuff with millions of results from a database (although you would do in the db if you can, but might be a flat file too).

Linq with IEnumerable doesn't necessarily create intermediate list (js arrays) in memory unless it has to like say .OrderBy()

So I basically assumed js was the same since it has generators but its seems map and filter etc don't support them yet?:

https://dev.to/nestedsoftware/lazy-evaluation-in-javascript-...

So then you get a solution like this that looks to me very confusing vs a fluent style.

Please tell me I am missing something

There are no comments on this comment yet.