Handbook
Glossary
iteration# ( i xi a b -- # )
Vocabulary
project-euler
.
255
.
private
Inputs
i
an
object
xi
an
object
a
an
object
b
an
object
Outputs
#
an
object
Definition
USING:
kernel
math
;
IN:
project-euler.255.private
::
iteration#
( i xi a b -- # )
a a xi
next-multiple
[
dup
b
<
]
[
[
nip
[
1
+
]
[
xi
+
]
bi
]
2keep
[
i xi
]
2dip
(iteration#)
]
produce-sum
[
drop
b
[
i xi
]
2dip
(iteration#)
]
dip
+
;