rust
fn main() {
for i in (0..3).rev().step_by(1) {
print!("{}", i);
}
}
// 打印结果:210
Trait std::iter::Iterator
- fn rev(self) -> Rev where Self: Sized + DoubleEndedIterator
- fn step_by(self, step: usize) -> StepBy where Self: Sized