Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: