Handbook
Glossary
josephus ( n k -- m )
Vocabulary
rosetta-code
.
josephus-problem
Inputs
n
an
object
k
an
object
Outputs
m
an
object
Definition
USING:
kernel
;
IN:
rosetta-code.josephus-problem
::
josephus
( n k -- m )
k 2
=
[
n
josephus-2
]
[
n k
josephus-k
]
if
;