Skip to main content

std_arr_zip

Function std_arr_zip 

Source
pub fn std_arr_zip(
    _: &mut Evaluator,
    args: Vec<Value>,
    span: Span,
) -> Result<Value, Error>
Expand description

Zips two arrays into an array of tuples.

arr_zip([1, 2, 3], ["a", "b", "c"])[(1, "a"), (2, "b"), (3, "c")]

Stops at the shorter array (same behaviour as Rust’s zip).