Skip to content

Commit

Permalink
fix spec text to yield undersized final chunk on exhaustion
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelficarra committed Sep 6, 2024
1 parent 50e5209 commit 32bd017
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ copyright: false
1. Let _buffer_ be a new empty List.
1. Repeat,
1. Let _value_ be ? IteratorStepValue(_iterated_).
1. If _value_ is ~done~, return ~unused~.
1. If _value_ is ~done~, then
1. If _buffer_ is not empty, then
1. Perform Completion(Yield(CreateArrayFromList(_buffer_))).
1. Return ~unused~.
1. Append _value_ to _buffer_.
1. If the number of elements in _buffer_ is ℝ(_chunkSize_), then
1. Let _completion_ be Completion(Yield(CreateArrayFromList(_buffer_))).
Expand Down

0 comments on commit 32bd017

Please sign in to comment.