Handbook
Glossary
>base-digits ( n radix -- seq )
Vocabulary
math
.
parser
Inputs
n
an
integer
radix
an
object
Outputs
seq
a
sequence
Word description
Converts a real number to a list of its digits in the given radix. The result is a sequence of integer digits.
Definition
USING:
kernel
math
sequences
;
IN:
math.parser
:
>base-digits
( n radix -- seq )
[
/mod
]
curry
[
dup
0
>
]
swap
produce
nip
reverse
;