Generalized unzip