Author: | luis |
---|---|
Mode: | factor |
Date: | Sat, 29 Aug 2009 01:25:44 |
:: (fact-iter) ( p i n -- n! ) i n > [ p ] [ i p * i 1 + n (fact-iter) ] if ; :: fact-iter ( n -- n! ) 1 1 n (fact-iter) ;
Author: | alec |
---|---|
Mode: | factor |
Date: | Sat, 29 Aug 2009 01:40:18 |
: (fact-iter) ( p i n -- n! ) 2dup > [ 2drop ] [ [ dup 1 + [ * ] dip ] dip (fact-iter) ] if ;