fn enumerate_differences(input: &mut Vec<i32>) -> (i32, i32) {
    let mut start = (0, 1); // start with 1 jump from highest to laptop (3)
    start = accumulate_window(start, &[0, input[0]]); // consider the first jump from wall
    input.windows(2).fold(start, |acc, x| accumulate_window(acc, x))
}
// returns (1 joltage differences, 3 joltage differences)
returns (1 joltage differences, 3 joltage differences)
returns ( 1 joltage differences 3 joltage differences )
fn enumerate_differences(input: &mut Vec<i32>) -> (i32, i32) {
    let mut start = (0, 1); // start with 1 jump from highest to laptop (3)
    start = accumulate_window(start, &[0, input[0]]); // consider the first jump from wall
    input.windows(2).fold(start, |acc, x| accumulate_window(acc, x))
}
fn enumerate_differences ( input : & mut Vec < i32 > ) -> ( i32 , i32 ) { let mut start = ( 0 , 1 ) ; // start with 1 jump from highest to laptop (3) start = accumulate_window ( start , & [ 0 , input [ 0 ] ] ) ; // consider the first jump from wall input . windows ( 2 ) . fold ( start , | acc , x | accumulate_window ( acc , x ) ) }
returns (1 joltage differences, 3 joltage differences)
returns ( 1 joltage differences 3 joltage differences )
input
&mut Vec<i32>