Function num::iter::rangeExperimental
[-]
[+]
[src]
pub fn range<A: Add<A, A> + PartialOrd + Clone + One>(start: A, stop: A) -> Range<A>
Returns an iterator over the given range [start, stop) (that is, starting at start (inclusive), and ending at stop (exclusive)).
Example
fn main() { let array = [0, 1, 2, 3, 4]; for i in range(0, 5u) { println!("{}", i); assert_eq!(i, array[i]); } }let array = [0, 1, 2, 3, 4]; for i in range(0, 5u) { println!("{}", i); assert_eq!(i, array[i]); }