Function advent_of_code_2021::day_18::add_numbers[−][src]

fn add_numbers(numbers: &Vec<SnailfishNumber>) -> SnailfishNumber
Expand description

The solution to part one - fold the list of numbers into the first and return the resulting number. The puzzle solution then converts this to its magnitude, but returning the full tree allows unit tests to compare this to the expectation.