Handbook
Glossary
count-digits ( n -- byte-array )
Vocabulary
project-euler
.
common
.
private
Inputs
n
an
object
Outputs
byte-array
an
object
Definition
USING:
byte-arrays
kernel
math
sequences
;
IN:
project-euler.common.private
:
count-digits
( n -- byte-array )
10
<byte-array>
[
[
[
10
/mod
]
]
dip
[
[
1
+
]
change-nth
dup
0
>
]
curry
compose
loop
drop
]
keep
;