Handbook
Glossary
>base36 ( seq -- base36 )
Base36 conversions
Next:
base36> ( base36 -- seq )
Vocabulary
base36
Inputs
seq
a
sequence
Outputs
base36
a
sequence
Word description
Encode into Base36 encoding.
Definition
USING:
base36.private
endian
kernel
math
sequences
;
IN:
base36
::
>base36
( seq -- base36 )
BV{
}
clone
:>
accum seq
[
zero?
not
]
find
[
drop
seq
length
]
unless
:>
i seq i
tail-slice
be>
[
36
/mod
ch>base36
accum
push
]
until-zero
i
alphabet
first
[
accum
push
]
curry
times
accum
reverse!
B{
}
like
;