Hacker News new | ask | show | jobs
by rbehrends 3115 days ago
This does not require a different syntax. You'd just construct a lazy list instead of an array.

Neither is an improvement over the other. Sometimes it's more important to have the results up front fast, sometimes generating them on demand is better.