Handbook
Glossary
(^mod) ( x y n -- z )
Vocabulary
math
.
functions
.
private
Inputs
x
an
object
y
an
object
n
an
object
Outputs
z
an
object
Definition
USING:
kernel
math
math.bits
sequences
;
IN:
math.functions.private
:
(^mod)
( x y n -- z )
[
make-bits
1
]
dip
dup
[
[
[
over
*
]
]
dip
[
mod
]
curry
compose
]
dip
[
[
sq
]
]
dip
[
mod
]
curry
compose
[
[
when
]
curry
]
dip
[
dip
]
curry
compose
reduce
nip
;
inline