Y
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
quadratini
4156 days ago
It's only lazy if it's part of a chain
link
jdd
4156 days ago
Chaining is deferred until `value()` is implicitly or explicitly called. However shortcut fusion does not apply to `forEach`.
link