Hands-On-Functional-Program.../Chapter01/intro_iterators.rs
2018-03-15 16:17:18 -06:00

22 lines
308 B
Rust

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();
}