Skip to content

Commit

Permalink
move yield higher up
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Dec 7, 2023
1 parent aeece26 commit 336e4b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/squint/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@ function* _reductions3(f, init, coll) {
yield init.value;
return;
}
yield init;
let s = iterable(coll)[Symbol.iterator]();
let fst, rst;
const vd = s.next();
Expand All @@ -612,7 +613,6 @@ function* _reductions3(f, init, coll) {
fst = vd.value;
rst = s;
}
yield init;
if (s) {
yield* _reductions3(f, f(init, fst), rst);
}
Expand Down

0 comments on commit 336e4b8

Please sign in to comment.