This commit is contained in:
ge
2025-12-26 22:38:52 +03:00
commit b9b57ad93f
8 changed files with 466 additions and 0 deletions

20
README.md Normal file
View File

@@ -0,0 +1,20 @@
# Operating with Ranges of Numbers
The `ranges` module provides tools for creating ranges of numbers.
Ranges are represented by the generic `Range` iterator, which has start and
end points, a step size, and an inclusive/exclusive flag.
```v
import ranges
// Iterate from 0 to 5 with step 2. Negative values also supported.
for i in ranges.range(0, 5, 2) {
println(i)
}
// 0
// 2
// 4
```
See more usage examples in [ranges_test.v](ranges_test.v).