Okay, then for

        reduce &avg $identity, @list

What should $identity be?

<chaim>

>>>>> "AS" == Ariel Scolnicov <[EMAIL PROTECTED]> writes:

AS> Think of the first element of the list as different from the rest --
AS> it is the initial value to reduce from (for + and *, you'll usually
AS> pick an appropriate identity element).  By writing

AS>         @sum = reduce __+__ 0, @numbers

AS> you deal elegantly with both cases.

AS> NOTE: I find this trick very elegant.  I wish it were my trick,
AS> instead of Damian's...

-- 
Chaim Frenkel                                        Nonlinear Knowledge, Inc.
[EMAIL PROTECTED]                                               +1-718-236-0183

Reply via email to