fn main() { println!("{:?}", [1, 2, 3, 4, 5].iter().step_by(2).collect::<Vec<_>>());}
Standard input is empty
[1, 3, 5]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!