Skip to content

Commit 75ae2fa

Browse files
authored
missing increment for i in for/await example (#51)
This fixes the for/await version of the `Data.fromAsync` example.
1 parent 7c9b1c1 commit 75ae2fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ Data.fromAsync = Array.fromAsync;
224224
// property assigned to `2`, etc.
225225
const d = new Data(0); let i = 0;
226226
for await (const v of asyncGen(4)) {
227-
d[i] = v;
227+
d[i++] = v;
228228
}
229229

230230
// This is equivalent.

0 commit comments

Comments
 (0)