Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main() {
- let things: Vec<i32> = (0..10)
- .into_iter()
- .map(|n| n *2)
- .collect();
- let thing_chunks: std::slice::Chunks<Vec<i32>> = things.chunks(2).collect();
- println!("{:?}", things);
- println!("{:?}", thing_chunks);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement