unzip

one of the documented procedures in this installation of the ACS
Usage:
unzip   xs
What it does:
unzip takes a list of tuples {x1 y1} {x2 y2} {x3 y3} ... and returns a tuple of lists {x1 x2 x3 ...} {y1 y2 y3 ...}.
Defined in: /web/philip/tcl/ad-functional.tcl

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]


philg@mit.edu