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
8 changes: 6 additions & 2 deletions spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ copyright: false
1. Let _closure_ be a new Abstract Closure with no parameters that captures _iterated_ and _chunkSize_ and performs the following steps when called:
1. Let _buffer_ be a new empty List.
1. Repeat,
1. Let _value_ be ? IteratorStepValue(_iterated_).
1. Let _result_ be Completion(IteratorStepValue(_iterated_)).
1. IfAbruptCloseIterator(_result_, _iterated_).
1. Let _value_ be ! _result_.
1. If _value_ is ~done~, then
1. If _buffer_ is not empty, then
1. Perform Completion(Yield(CreateArrayFromList(_buffer_))).
Expand Down Expand Up @@ -57,7 +59,9 @@ copyright: false
1. Let _closure_ be a new Abstract Closure with no parameters that captures _iterated_, _windowSize_, and _undersized_ and performs the following steps when called:
1. Let _buffer_ be a new empty List.
1. Repeat,
1. Let _value_ be ? IteratorStepValue(_iterated_).
1. Let _result_ be Completion(IteratorStepValue(_iterated_)).
1. IfAbruptCloseIterator(_result_, _iterated_).
1. Let _value_ be ! _result_.
1. If _value_ is ~done~, then
1. If _undersized_ is *"allow-partial"*, _buffer_ is not empty, and the number of elements in _buffer_ < ℝ(_windowSize_), then
1. Perform Completion(Yield(CreateArrayFromList(_buffer_))).
Expand Down
Loading