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
Currently the arrange function compares start and stop and checks if that agrees with the increment argument. If start is greater than stop and increment is positive, the function bails with an empty yielder.
I'd like to float the idea of matching behaviour with list.range but with the step be configurable so...
The thinking being we also generate from the first argument to the second argument using the positive step size provided. In cases where the step size is negative we generate backwards from the second argument to the first.
In the common case this would match the behaviour of list.range, what do you think?
The text was updated successfully, but these errors were encountered:
I think if we want to keep things as simple as possible, then the current behavior is better. As I see it, the proposed behavior would introduce ambiguity by allowing two ways to generate the same progression of values. In particular, it would change how the increment/step argument is interpreted: the sign of the increment/step would be ignored when reversing the range direction.
Currently the
arrange
function comparesstart
andstop
and checks if that agrees with theincrement
argument. Ifstart
is greater thanstop
andincrement
is positive, the function bails with an empty yielder.I'd like to float the idea of matching behaviour with
list.range
but with the step be configurable so...The thinking being we also generate from the first argument to the second argument using the positive step size provided. In cases where the step size is negative we generate backwards from the second argument to the first.
In the common case this would match the behaviour of
list.range
, what do you think?The text was updated successfully, but these errors were encountered: