Skip to content

Commit

Permalink
Let the callback return arrays with non numerical keys.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Jan 9, 2020
1 parent 34b62c4 commit 77d111f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Operation/Iterate.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function on(iterable $collection): Closure

return static function () use ($callback, $parameters): Generator {
while (true) {
yield $parameters = $callback(...(array) $parameters);
yield $parameters = $callback(...array_values((array) $parameters));
}
};
}
Expand Down

0 comments on commit 77d111f

Please sign in to comment.