A forward loop is like this:
for x in 0..100 {
println!("{}", x);
}
And a reverse loop is done by calling Iterator::rev
to reverse the order:
for x in (0..100).rev() {
println!("{}", x);
}
A forward loop is like this:
for x in 0..100 {
println!("{}", x);
}
And a reverse loop is done by calling Iterator::rev
to reverse the order:
for x in (0..100).rev() {
println!("{}", x);
}