methods using range-based for loop with no const begin and end for Digit