RangeInclusive
class RangeInclusive<T>
Source: compiler/src/builtin_docs/prelude.hy A lazy inclusive range start..=end: every value from start up to and including end.
Written with the ..= operator. Iteration and .to_vec() follow the same
rules as Range: step 1 (or 1.0), numeric bounds only, and empty when
end is less than start.
Methods#
Examples#
use tests::assert;
let sum = 0;
for i in 1..=4 {
sum = sum + i;
}
assert!(sum == 10);