import * as tracing_1 from "../../../../Tracing"
const fileName_1 = "(@effect-ts/system): _src/Collections/Immutable/Chunk/api/unzip.ts"
import * as Tp from "../../Tuple"
import { append_, empty } from "../core"
import { forEach_ } from "./forEach"
/**
 * The function is reverse of `zip`. Takes an array of pairs and return two corresponding arrays
 */

export function unzip(as) {
  let fa = empty()
  let fb = empty()
  forEach_(as, ({ tuple: [a, b] }) => {
    fa = append_(fa, a)
    fb = append_(fb, b)
  })
  return Tp.tuple(fa, fb)
}
//# sourceMappingURL=unzip.js.map
