Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ copyright: false
1. Let _buffer_ be a new empty List.
1. Repeat,
1. Let _value_ be ? IteratorStepValue(_iterated_).
1. If _value_ is ~done~, return ReturnCompletion(*undefined*).
1. If _value_ is ~done~, then
1. If _buffer_ is not empty and the number of elements in _buffer_ < ℝ(_windowSize_), then
1. Repeat, while the number of elements in _buffer_ < ℝ(_windowSize_),
1. Append *undefined* to _buffer_.
1. Perform ? Yield(CreateArrayFromList(_buffer_)).
1. Return ReturnCompletion(*undefined*).
1. Append _value_ to _buffer_.
1. If the number of elements in _buffer_ is ℝ(_windowSize_), then
1. Let _completion_ be Completion(Yield(CreateArrayFromList(_buffer_))).
Expand Down