fn naive_add(lhs: &Self, rhs: &Self) -> Self {
        let (Digits(longer), Digits(shorter)) = if lhs.0.len() > rhs.0.len() {
            (lhs, rhs)
        } else {
            (rhs, lhs)
        };

        Self(
            longer
                .iter()
                .zip(shorter.iter().chain(std::iter::repeat(&0)))
                .map(|(l, r)| l + r)
                .collect::<Vec<_>>(),
        )
    }
/// naive_add simply adds each digits. it can result in invalid instance so needs post-process (e.g. half)
naive_add simply adds each digits. it can result in invalid instance so needs post-process
naive_add simply adds each digits . it can result in invalid instance so needs post - process
fn naive_add(lhs: &Self, rhs: &Self) -> Self {
        let (Digits(longer), Digits(shorter)) = if lhs.0.len() > rhs.0.len() {
            (lhs, rhs)
        } else {
            (rhs, lhs)
        };
        Self(
            longer
                .iter()
                .zip(shorter.iter().chain(std::iter::repeat(&0)))
                .map(|(l, r)| l + r)
                .collect::<Vec<_>>(),
        )
    }
fn naive_add ( lhs : & Self , rhs : & Self ) -> Self { let ( Digits ( longer ) , Digits ( shorter ) ) = if lhs . 0 . len ( ) > rhs . 0 . len ( ) { ( lhs , rhs ) } else { ( rhs , lhs ) } ; Self ( longer . iter ( ) . zip ( shorter . iter ( ) . chain ( std :: iter :: repeat ( & 0 ) ) ) . map ( | ( l , r ) | l + r ) . collect :: < Vec < _ > > ( ) , ) }
naive_add simply adds each digits.
naive_add simply adds each digits .
lhs
&Self
rhs
&Self