# bin/set-i16-le Return a copy of `$bytes` with a signed 16-bit integer written at `offset` (little-endian). Byte strings are immutable — the original `$bytes` is unchanged. ## Syntax
[bin/set-i16-le $bytes $offset $value]
## Parameters - `$bytes` — byte string to copy and write into - `$offset` — 0-based byte offset - `$value` — value to write; clamped to the 16-bit range and truncated toward zero ## Examples
def buf [bin/set-i16-le [bin/zeros 2] 0 -1234]
[bin/i16-le-at $buf 0] # → -1234
[bin/u8-at $buf 0] # → 46
## Returns New byte string. A negative or out-of-bounds offset returns `%Err{:message}`. ## See Also `bin/i16-le-at`, `bin/set-i16-be`, `bin/set-bytes`, `bin/bytes`