You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fatal error: Uncaught Exception: Cannot rewind a generator that was already run in src/Psl/Dict/slice.php on line 42
Exception: Cannot rewind a generator that was already run in src/Psl/Dict/slice.php on line 42
or
Result:
Fatal error: Uncaught Exception: Cannot rewind a generator that was already run in src/Psl/Dict/take_while.php on line 29
Exception: Cannot rewind a generator that was already run in src/Psl/Dict/take_while.php on line 29
fixing this just for take/drop functions might be a good idea, but we have to evaluate the performance impact, thankfully, we now have benchmarks, so we can spot massive performance drops easily.
Describe the bug
When calling
Dict\take()
andDict\take_while()
twice on an iterator, you receive a fatal exception.More info, see #215.
To Reproduce
Result:
or
Result:
Expected behavior
It should list:
Additional context
Handling take like this does the trick:
The text was updated successfully, but these errors were encountered: