You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The introduction of a generator into the pipeline implicitly invokes some looping, producing a generator as output. But what happens when you pipeline together two generators?
Like, say you have:
function* range(n) { for(const i = 0; i < n; i++) yield n; }
function* fbb(n) { yield "foo"+n; yield "bar"+n; yield "baz"+n; }
const what = range +> fbb +> (x=>console.log(x));
what(5); // what happens?
Does this implicitly loop twice, calling the final function 15 times in total?
The text was updated successfully, but these errors were encountered:
The introduction of a generator into the pipeline implicitly invokes some looping, producing a generator as output. But what happens when you pipeline together two generators?
Like, say you have:
Does this implicitly loop twice, calling the final function 15 times in total?
The text was updated successfully, but these errors were encountered: