pub fn call_array_method(
arr: &mut Vec<Value>,
method: &str,
args: &[Value],
) -> GentResult<Value>Expand description
Call a method on an array value (non-lambda methods only)
§Arguments
arr- The array to call the method on (mutable for push/pop)method- The method nameargs- Arguments to the method
§Supported Methods
length()- Returns the number of elementspush(value)- Adds an element to the end (mutates array)pop()- Removes and returns the last element (mutates array)indexOf(value)- Returns index of first occurrence, or -1join(separator)- Joins elements into a stringslice(start, end)- Returns a new array with elements from start to endconcat(other)- Returns a new array combining this and other