This function successively peels off terms of the formula until there is only one term (factor) on the right side. Each time it encounters a factor, it prints the means for the levels of that factor, calling itself recursively if there is more than one factor to process. The display is therefore a hierarchical listing of means starting from the last factor on the right side of the formula.
Notice also that the maximum number of levels may be limited, with a default of 10. This is a bit of insurance in case a variable with a huge number of levels slips in as a factor. If you really want more than 10 levels for any variable, you can pass the appropriate value.