pub fn solve_part1<R: std::io::BufRead>(input: R) -> anyhow::Result<i32> {
    // Counting from -1 means the first increase won't be counted, and all
    // inputs are positive integers > 0, so the first input will always
    // increase the count.
    let mut count = -1;
    let mut last = 0;
    for i in parse_input_as_value_list::<_, i32>(input) {
        let i = i?;

        if i > last {
            count += 1;
        }

        last = i;
    }

    Ok(count)
}
/// Count the number of increases in a list of height readings.
///
/// The first item is not considered an increase.
Count the number of increases in a list of height readings.
The first item is not considered an increase.
Count the number of increases in a list of height readings . The first item is not considered an increase .
pub fn solve_part1<R: std::io::BufRead>(input: R) -> anyhow::Result<i32> {
    // Counting from -1 means the first increase won't be counted, and all
    // inputs are positive integers > 0, so the first input will always
    // increase the count.
    let mut count = -1;
    let mut last = 0;
    for i in parse_input_as_value_list::<_, i32>(input) {
        let i = i?;
        if i > last {
            count += 1;
        }
        last = i;
    }
    Ok(count)
}
pub fn solve_part1 < R : std :: io :: BufRead > ( input : R ) -> anyhow :: Result < i32 > { // Counting from -1 means the first increase won't be counted, and all // inputs are positive integers > 0, so the first input will always // increase the count. let mut count = - 1 ; let mut last = 0 ; for i in parse_input_as_value_list :: < _ , i32 > ( input ) { let i = i ? ; if i > last { count += 1 ; } last = i ; } Ok ( count ) }
Count the number of increases in a list of height readings.
Count the number of increases in a list of height readings .
input
R