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
seqa sequence of bytes
xa 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 ;