function removeConnection(prevSegments, nextSegments) {
  for (let i = 0; i < prevSegments.length; ++i) {
    const prevSegment = prevSegments[i];
    const nextSegment = nextSegments[i];

    remove(prevSegment.nextSegments, nextSegment);
    remove(prevSegment.allNextSegments, nextSegment);
    remove(nextSegment.prevSegments, prevSegment);
    remove(nextSegment.allPrevSegments, prevSegment);
  }
}
Disconnect given segments.

This is used in a process for switch statements.
If there is the "default" chunk before other cases, the order is different
between node's and running's.
@param {CodePathSegment[]} prevSegments Forward segments to disconnect.
@param {CodePathSegment[]} nextSegments Backward segments to disconnect.
@returns {void}