Re: Sum of list?
Re: Sum of list?
- Subject: Re: Sum of list?
- From: Emmanuel <email@hidden>
- Date: Tue, 29 Jun 2004 12:31:27 +0200
At 9:15 PM -0400 28/06/04, Graff wrote:
>
I don't know of any implementations of summation algorithms that don't do some sort of iteration in order to sum up a 1-D array (list) of integers.
Before "statlist" existed, I used the following to avoid running a loop:
set theList to {1, 2, 3}
set theCount to length of theList
set text item delimiters to "+"
set theSum to run script "" & theList
set theAverage to theSum / theCount
(that's faster than the loop, but not much)
Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.