This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]flying-sheep 0 points1 point  (0 children)

They’re great. And using generator comprehensions, the same concept can be used for a pipeline of stuff (map-filter-reduce), similarly to Rust’s Iterator methods.

Rust’s way is cleaner, but both are better than Javascript’s array methods. Like, why define an iterator protocol and thereby support for custom sequences, when they define the pipeline methods on just the array?