pub fn solve_part1<R: std::io::BufRead>(input: R) -> anyhow::Result<i64> {
    let sub: Submarine = Default::default();

    let sub = parse_input_as_value_list_anyhow::<_, MoveCommand>(input)
        .fold_ok(sub, |sub, cmd| sub.perform_simple(cmd))?;

    Ok(sub.pos_x * sub.pos_z)
}
/// Calculate the final position of the submarine after a series of movements.
Calculate the final position of the submarine after a series of movements.
Calculate the final position of the submarine after a series of movements .
pub fn solve_part1<R: std::io::BufRead>(input: R) -> anyhow::Result<i64> {
    let sub: Submarine = Default::default();
    let sub = parse_input_as_value_list_anyhow::<_, MoveCommand>(input)
        .fold_ok(sub, |sub, cmd| sub.perform_simple(cmd))?;
    Ok(sub.pos_x * sub.pos_z)
}
pub fn solve_part1 < R : std :: io :: BufRead > ( input : R ) -> anyhow :: Result < i64 > { let sub : Submarine = Default :: default ( ) ; let sub = parse_input_as_value_list_anyhow :: < _ , MoveCommand > ( input ) . fold_ok ( sub , | sub , cmd | sub . perform_simple ( cmd ) ) ? ; Ok ( sub . pos_x * sub . pos_z ) }
Calculate the final position of the submarine after a series of movements.
Calculate the final position of the submarine after a series of movements .
input
R