Handbook
Glossary
factorial ( n -- n! )
Vocabulary
math
.
factorials
Inputs
n
an
object
Outputs
n!
an
object
Definition
USING:
kernel
math
ranges
sequences
;
IN:
math.factorials
MEMO:
factorial
( n -- n! )
dup
1
>
[
[1..b]
product
]
[
drop
1
]
if
;