Handbook
Glossary
count-factor ( n d -- n' c )
Vocabulary
math
.
primes
.
brute-force
.
private
Inputs
n
an
object
d
an
object
Outputs
n'
an
object
c
an
object
Definition
USING:
kernel
math
;
IN:
math.primes.brute-force.private
:
count-factor
( n d -- n' c )
[
1
]
2dip
[
/i
]
keep
[
dupd
/mod
zero?
]
curry
[
nip
[
1
+
]
dip
]
while
drop
swap
;