mirror of
https://github.com/gechandesu/ranges.git
synced 2026-03-25 19:43:24 +03:00
808870ff09e6ae44b4f562523a402bd0c0a94fd9
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 and a step size.
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.
Description
Languages
V
100%