pub fn print_and_count(b: &BigInt) {
    let mut count: usize = 0;
    b.act(|digit| { println!("{}: {}", count, digit); count = count +1; } );
    println!("There are {} digits", count);
}
// Remember that we decided to use the `FnMut` trait above? This means our closure could actually mutate its environment.
// For example, we can use that to count the digits as they are printed.
Remember that we decided to use the `FnMut` trait above. This means our closure could actually mutate its environment.
For example, we can use that to count the digits as they are printed.
Remember that we decided to use the ` FnMut ` trait above . This means our closure could actually mutate its environment . For example we can use that to count the digits as they are printed .
pub fn print_and_count(b: &BigInt) {
    let mut count: usize = 0;
    b.act(|digit| { println!("{}: {}", count, digit); count = count +1; } );
    println!("There are {} digits", count);
}
pub fn print_and_count ( b : & BigInt ) { let mut count : usize = 0 ; b . act ( | digit | { println ! ( " " count digit ) ; count = count + 1 ; } ) ; println ! ( " " count ) ; }
Remember that we decided to use the `FnMut` trait above?
Remember that we decided to use the ` FnMut ` trait above?
b
&BigInt
b
&BigInt