The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Skip The First N Number Of Items In A Rust Iterator Loop

TODO: Pull subtitle into page object
Code
fn main() {
    let source = vec!["alfa", "bravo", "charlie", "delta"];
    source.iter().skip(2).for_each(|x| println!("{}", x));
}
Results
charlie
delta

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

Skip The First N Number Of Items In A Rust Iterator Loop

Use `.skip()` on an iterator to start at a place after
the first item. For example:

-- code
-- rust

fn main() {
    let source = vec!["alfa", "bravo", "charlie", "delta"];
    source.iter().skip(2).for_each(|x| println!("{}", x));
}

-- results

charlie
delta



-- blurb

Jump ahead in a Rust loop

-- categories
-- Rust 

-- metadata
-- date: 2023-04-04 20:00:31
-- id: 2nz2wqyk
-- site: aws
-- type: post
-- status: published