Range
class Range<T>
Source: compiler/src/builtin_docs/prelude.hy A lazy half-open range start..end: every value from start up to, but not including, end.
Written with the .. operator; the bounds must have the same type with an
Ord instance. for x in a..b and .to_vec() step by 1 (or 1.0) and
work for int, byte and float bounds only. A range whose end is not
greater than its start is empty.
Methods#
Examples#
use tests::assert;
let sum = 0;
for i in 0..4 {
sum = sum + i;
}
assert!(sum == 6);