>>>>> "GB" == Graham Barr <[EMAIL PROTECTED]> writes: GB> On Thu, Aug 10, 2000 at 07:22:21PM -0400, Chaim Frenkel wrote: >> Okay, then for >> >> reduce &avg $identity, @list >> >> What should $identity be? GB> I would like to see what &avg would be, given that each time it GB> would be passed the previous result (or the first element) and GB> the next element. GB> So without using an external variable to keep count of how many GB> elements had been processed so far it could not be done. So you GB> would probably do it like See, Damian's answer to this question. (A cute curry where the class carried the count and the deref carried the current sum.) <chaim> -- Chaim Frenkel Nonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183
- Re: RFC 76 (v1) Builtin: reduce Ariel Scolnicov
- Re: RFC 76 (v1) Builtin: reduce Chaim Frenkel
- Re: RFC 76 (v1) Builtin: reduce Ariel Scolnicov
- Re: RFC 76 (v1) Builtin: reduce Chaim Frenkel
- Re: RFC 76 (v1) Builtin: reduce Jeremy Howard
- Re: RFC 76 (v1) Builtin: reduce Ariel Scolnicov
- Re: RFC 76 (v1) Builtin: reduce Bart Lateur
- Re: RFC 76 (v1) Builtin: reduce Graham Barr
- Re: RFC 76 (v1) Builtin: reduce John Porter
- Re: RFC 76 (v1) Builtin: reduce Graham Barr
- Re: RFC 76 (v1) Builtin: reduce Chaim Frenkel
- Re: RFC 76 (v1) Builtin: reduce Damian Conway
- Re: RFC 76 (v1) Builtin: reduce Damian Conway
- Re: RFC 76 (v1) Builtin: reduce Damian Conway
- Re: RFC 76 (v1) Builtin: reduce Jeremy Howard
- Re: RFC 76 (v1) Builtin: reduce Damian Conway
- Re: RFC 76 (v1) Builtin: reduce Glenn Linderman
- Re: RFC 76 (v1) Builtin: reduce Damian Conway
- Re: RFC 76 (v1) Builtin: reduce John Porter
- Re: RFC 76 (v1) Builtin: reduce Piers Cawley
- Re: RFC 76 (v1) Builtin: reduce Graham Barr