Skip to main content

builtin_replace

Function builtin_replace 

Source
fn builtin_replace(
    args: &[RValue],
    _: &[(String, RValue)],
) -> Result<RValue, RError>
Expand description

Replace values in a vector at specified indices.

Preserves the type of the input vector. Replacement values are coerced to the input type and recycled if shorter than the index vector.

@param x vector to modify @param list indices at which to replace (1-indexed) @param values replacement values (recycled if shorter) @return modified vector with same type as x