
> function math.mean(...) > local argc=select("#",...) > local total=0 > for i=1,argc do > total=total+(select(i,...)) > end > return total/argc > end Now, a case for math.sum could be made in order to avoid select, just as there is math.min and math.max.