Hacker News new | ask | show | jobs
by bsimpson 4156 days ago
I dig laziness, but why is `forEach` lazy? That's the only one that invokes immediately in libraries like Lazy.js.
2 comments

It's only lazy if it's part of a chain
Chaining is deferred until `value()` is implicitly or explicitly called. However shortcut fusion does not apply to `forEach`.