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
There is a potential issue with how iterator arguments are evaluated. See my Stackoverflow post here for the gritty details.
I also note that in addition to what I observed, sometimes inline iterators also seem to evaluate their arguments multiple times (e.g. if you make the take iterator in the code inline, it still doesn't work).
My recommendation would be to settle on once-per-iteration or once-per-loop evaluation as a default for both inline and closure iterators and to have a pragma to allow for the other behavior as an option.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. If you think it is still a valid issue, write a comment below; otherwise it will be closed. Thank you for your contributions.
stalebot
added
the
stale
Staled PR/issues; remove the label after fixing them
label
Aug 4, 2020
There is a potential issue with how iterator arguments are evaluated. See my Stackoverflow post here for the gritty details.
I also note that in addition to what I observed, sometimes inline iterators also seem to evaluate their arguments multiple times (e.g. if you make the
take
iterator in the code inline, it still doesn't work).My recommendation would be to settle on once-per-iteration or once-per-loop evaluation as a default for both inline and closure iterators and to have a pragma to allow for the other behavior as an option.
The text was updated successfully, but these errors were encountered: