848ba7303b
FossilOrigin-Name: b5feea667d30aac255d1cfca61fed355d438d2ce6021677f1e53af6302b15eee
13 lines
168 B
Text
13 lines
168 B
Text
# example|RecursiveFactorial
|
|
|
|
~~~
|
|
:<factorial>
|
|
dup #1 -eq? 0; drop
|
|
dup n:dec <factorial> * ;
|
|
|
|
:factorial
|
|
dup n:zero?
|
|
[ n:inc ]
|
|
[ <factorial> ] choose ;
|
|
~~~
|
|
|