Handbook
Glossary
factorial-power ( x n h -- (x)n(h) )
Vocabulary
math
.
factorials
Inputs
x
an
object
n
an
object
h
an
object
Outputs
(x)n(h)
an
object
Definition
USING:
combinators
kernel
math
math.functions
ranges
sequences
;
IN:
math.factorials
:
factorial-power
( x n h -- (x)n(h) )
{
{
1
[
falling-factorial
]
}
{
0
[
^
]
}
[
over
0
<
[
[
[
nip
+
]
[
swap
neg
*
+
]
3bi
]
keep
<range>
product
recip
]
[
neg
[
[
dupd
1
-
]
[
*
]
bi*
+
]
keep
<range>
product
]
if
]
}
case
;