f::unzip (public)
f::unzip xs
Defined in packages/acs-tcl/tcl/ad-functional-procs.tcl
Unzip takes a list of tuples {x1 y1} {x2 y2} {x3 y3} ... and returns a tuple of lists {x1 x2 x3 ...} {y1 y2 y3 ...}. It is just a special case of the function "transpose" and is here just for completeness.
- Parameters:
- xs (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- functional_api
Source code: set left {} set right {} foreach x $xs { # assertion: x is a tuple lappend left [lindex $x 0] lappend right [lindex $x 1] } return [list $left $right]XQL Not present: Generic, PostgreSQL, Oracle