Comment

Comment by redditor98654

One benefit is that it makes these operations lazy. There are no intermediate lists created when you call a map on a stream. If map were a method in a list, it would need to return a new list. And if you have multiple such maps etc, it would create more such lists for each map invocation.

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton