briefly explain how this function can calculate statistics of the numbers in a list without the use of variables and side effects.