Handbook
Glossary
-prime? ( n quot: ( n -- m ) -- ? )
Vocabulary
math
.
factorials
.
private
Inputs
n
an
object
quot
a
quotation
with stack effect
( n -- m )
Outputs
?
an
object
Definition
USING:
kernel
math
;
IN:
math.factorials.private
:
-prime?
( n quot: ( n -- m ) -- ? )
[
1 1
[
pick
over
-
1
<=
]
]
dip
[
[
drop
[
1
+
]
]
]
dip
[
bi
]
curry
compose
until
nip
-
abs
1
=
;
inline