Skip to content

Commit

Permalink
Update Window operation.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Jul 5, 2020
1 parent f8a5ad4 commit ecdbf36
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Operation/Window.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

use Closure;
use Generator;
use loophp\collection\Collection;
use loophp\collection\Contract\Operation;
use loophp\collection\Iterator\IterableIterator;
use loophp\collection\Transformation\Run;
Expand All @@ -27,7 +26,7 @@ public function __invoke(): Closure
static function (iterable $collection, array $length): Generator {
$i = 0;

$length = new IterableIterator((new Collection($length))->loop());
$length = new IterableIterator((new Run(new Loop()))($length));

// Todo: Find a way to get rid of unused variable $value.
foreach ($collection as $value) {
Expand Down

0 comments on commit ecdbf36

Please sign in to comment.