Hacker News new | ask | show | jobs
by saryant 4537 days ago
Scala gets around this with "views": store the higher-order functions until the collection actually needs to be used and then apply them all at once, without any intermediate data structure.

http://docs.scala-lang.org/overviews/collections/views.html