Handbook
Glossary
falling-factorial ( x n -- (x)n )
Vocabulary
math
.
factorials
Inputs
x
an
object
n
an
object
Outputs
(x)n
an
object
Definition
USING:
combinators
kernel
math
ranges
sequences
;
IN:
math.factorials
:
falling-factorial
( x n -- (x)n )
{
{
1
[
]
}
{
0
[
drop
0
]
}
[
dup
0
<
[
neg
[
+
]
keep
t
]
[
f
]
if
[
dupd
-
swap
(a..b]
product
]
dip
[
recip
]
when
]
}
case
;