@unzip
Transpose an array of pairs into two separate arrays.
Returns: array
Syntax
Section titled “Syntax”@unzip(pairs)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
pairs |
array |
Array of [a, b] pairs |
Examples
Section titled “Examples”# Unzip pairs into arraysset $pairs [[1 "a"] [2 "b"] [3 "c"]]set [$keys $vals] @unzip($pairs)See Also
Section titled “See Also”- @zip — combine two arrays into pairs