Re: Factorial [was Sine of the times...]
Re: Factorial [was Sine of the times...]
- Subject: Re: Factorial [was Sine of the times...]
- From: Richard Morton <email@hidden>
- Date: Mon, 24 Mar 2003 12:12:50 +1100
On Monday, March 24, 2003, at 06:47 AM, Doug McNutt wrote:
5! = 5 * 4 * 3 * 2 * 1 A recursive subroutine to calculate the
constants to an arbitrary limit is left as a stack overflowing
exercise for the reader.
This, from The FooDooLounge, is an AS version of the classic:
on factorial from n
if n = 0 then return 1
return n * (factorial from (n - 1))
end factorial
Cheers,
Max Factorial
<
http://home.netc.net.au/~sunreal/FooDooLounge/>
_______________________________________________
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.