You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
308 B
Rust
22 lines
308 B
Rust
7 years ago
|
fn main() {
|
||
|
|
||
|
(0..10).chain(10..20);
|
||
|
|
||
|
(0..10).zip(10..20);
|
||
|
|
||
|
(0..10).enumerate();
|
||
|
|
||
|
(0..10).inspect(|x|{ println!("value {}", *x) });
|
||
|
|
||
|
(0..10).map(|x| x*x);
|
||
|
|
||
|
(0..10).filter(|x| *x<3);
|
||
|
|
||
|
(0..10).fold(0, |x,y| x+y);
|
||
|
|
||
|
for i in (0..10) {}
|
||
|
|
||
|
let v: Vec<u32> = (0..10).collect();
|
||
|
|
||
|
}
|