Factor Documentation
|
Home
|
Glossary
|
Search
factorcode.org
le> ( seq -- x )
Factor documentation
>
Factor handbook
>
Input and output
>
Working with binary data
Prev:
be> ( seq -- x )
Next:
>be ( x n -- byte-array )
Vocabulary
io.binary
Inputs and outputs
seq
a sequence of bytes
x
a non-negative integer
Word description
Converts a sequence of bytes in little endian order into an unsigned integer.
Definition
USING:
kernel
math
sequences
;
IN:
io.binary
:
le>
( seq -- x )
dup
length
iota
0
[
8
*
shift
+
]
2reduce
;