Handbook
Glossary
le> ( seq -- x )
Working with binary data
Prev:
be> ( seq -- x )
Next:
>be ( x n -- byte-array )
Vocabulary
endian
Inputs
seq
a
sequence
of bytes
Outputs
x
a non-negative integer
Word description
Converts a sequence of bytes in little endian order into an unsigned integer.
Definition
USING:
combinators
endian.private
kernel
sequences
;
IN:
endian
:
le>
( seq -- x )
dup
length
{
{
1
[
1le>
]
}
{
2
[
2le>
]
}
{
4
[
4le>
]
}
{
8
[
8le>
]
}
[
drop
slow-le>
]
}
case
;