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
However if you run this example, the output stops one item short of expected, eg: if the target was 5 you would get:
0
1
2
3
4
This occurs because the predicate is evaluated before the process function, and the process function is not called for the final value passed to the predicate function. ie: the value that the predicate returns true for.
I'm not sure which was the originally intended behaviour, but it would be great if one of the two was altered to make things consistent.
According to the docs, the seed value passed to
when.iterate
is passed to the handler and then f. However, it is first passed to the predicate.The text was updated successfully, but these errors were encountered: