effect-tree
    Preparing search index...

    Function unzip

    • Unzip a tree of [A, B] into a pair of congruent trees of types A and B.

      const zippedTree: Tree<[string, number]> = tree(
      ['a', 1],
      [leaf(['b', 2])],
      )

      const [left, right] = unzip(zippedTree)
      // left = branch('a', [leaf('b')])
      // right = branch( 1 , [leaf( 2 )])

      Type Parameters

      • A
      • B

      Parameters

      Returns [Tree<A>, Tree<B>]