Skip to main content

mutable_array_set

Function mutable_array_set 

Source
pub fn mutable_array_set(
    arr: &Value,
    idx: &Value,
    val: Value,
) -> Result<(), SemaError>
Expand description

mutable-array/set!: indexed write into an existing slot. Takes val by move so a caller that owns the value (the VM’s MutArrSet arm) pays no clone. The Sema-level contract returns the array itself — the caller hands back its own array handle after Ok(()).