Handbook
Glossary
josephus-k ( n k -- m )
Vocabulary
rosetta-code
.
josephus-problem
Inputs
n
an
object
k
an
object
Outputs
m
an
object
Definition
USING:
kernel
math
ranges
sequences
;
IN:
rosetta-code.josephus-problem
::
josephus-k
( n k -- m )
n
[1..b]
0
[
[
k
+
]
dip
mod
]
reduce
;