Const
Unzip a tree of [A, B] into a pair of congruent trees of types A and B.
[A, B]
A
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 )]) Copy
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 )])
Unzip a tree of
[A, B]into a pair of congruent trees of typesAandB.