lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Jun 22, 2010 at 2:52 PM, Stefan wrote:
> Hear, hear!
>
> -- Average function using arithmetic mean
> -- (using proposed math.sum function)
> function math.avg(...)
>    return math.sum(...) / select("#",...)
> end
>
> On a side note, I find it vaguely disappointing how many (too quick)
> responses to the original post were utterly wrong given the sample results.


The main difference I can see between my "too quick" response and your
"well thought-out solution" is that mine works, and yours doesn't.



> I know (hope?) we all could do better given some real effort. This seems to
> be a bit of a trend lately - of shooting from the hip with solution/sample
> code. Perhaps we should be less quick to respond and more careful with such
> responses?


Release Early, Release Often :-)


 - Jeff