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
I think that working of function slice is little broken right now.
Current implementation of slice function breaks iteration after fetching item from iterator that is outside of maximum index. It causes lost of last iteration element.
Hi,
I think that working of function
slice
is little broken right now.Current implementation of
slice
function breaks iteration after fetching item from iterator that is outside of maximum index. It causes lost of last iteration element.Consider example below:
https://3v4l.org/6B9QS
test 1
is original functiontest 2
is changed function to break immediately after yielding last elementWhen you have a function like that:
and do
slice($i(), 0, 3);
Do you expect to "preprocess 3" will be executed or not?
I made PR to illustrate change that fixes described behaviuor: #76
Regards
The text was updated successfully, but these errors were encountered: