Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Conversation

@skx
Copy link
Owner

@skx skx commented Nov 22, 2023

This pull-request closes #98, by ensuring that the range operator (..) can count down as well as up. This allows ranges such as:

  • 3..10
  • 4..0

However note that the first number cannot be negative, as that's then treated as "- [1, 2..]" - i.e. negative array, which makes no sense. This should be resolved, but it is a bigger job.

This pull-request closes #98, by ensuring that the range operator
(`..`) can count down as well as up.  This allows ranges such as:

* 3..10
* 4..0

However note that the first number cannot be negative, as that's
then treated as "- [1, 2..]" - i.e. negative array, which makes
no sense.  This should be resolved, but it is a bigger job.
@skx skx merged commit 6c4e83f into master Nov 22, 2023
@skx skx deleted the 98-range branch November 22, 2023 14:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Range operator assumes increasing direction

2 participants