set-array-nth ( elt n array -- ) (original) (raw)
set-array-nth ( elt n array -- )
Factor handbook » The language » Collections » Arrays » Unsafe array operations
Prev: | array-nth ( n array -- elt ) |
---|
Inputs
elt | an object |
---|---|
n | a non-negative fixnum |
array | an array |
Outputs
None
Word description
Low-level array element mutator.
Warning
This word is in the sequences.private vocabulary because it is unsafe. It does not check types or array bounds, and improper use can corrupt memory. User code must use set-nth instead.
Definition
USING: kernel math.private slots.private ;
: set-array-nth ( elt n array -- )
swap 2 fixnum+fast set-slot ; inline