Re: nested subs

2005-06-16 Thread Piers Cawley
Luke Palmer <[EMAIL PROTECTED]> writes: > On 6/16/05, Piers Cawley <[EMAIL PROTECTED]> wrote: >> So, I was about to write the following test for Pugs: >> >> sub factorial (Int $n) { >> my sub factn (Int $acc, $i) { >> return $acc if $i > $n; >> factn( $acc * $i, $i+1); >> }

Re: nested subs

2005-06-16 Thread Luke Palmer
On 6/16/05, Piers Cawley <[EMAIL PROTECTED]> wrote: > So, I was about to write the following test for Pugs: > > sub factorial (Int $n) { > my sub factn (Int $acc, $i) { > return $acc if $i > $n; > factn( $acc * $i, $i+1); > } > factn(1, 1); > } > > When I thought to ch