function makeSegments(context, begin, end, create) {
  const list = context.segmentsList;

  const normalizedBegin = begin >= 0 ? begin : list.length + begin;
  const normalizedEnd = end >= 0 ? end : list.length + end;

  const segments = [];

  for (let i = 0; i < context.count; ++i) {
    const allPrevSegments = [];

    for (let j = normalizedBegin; j <= normalizedEnd; ++j) {
      allPrevSegments.push(list[j][i]);
    }

    segments.push(create(context.idGenerator.next(), allPrevSegments));
  }

  return segments;
}
Creates new segments from the specific range of `context.segmentsList`.

When `context.segmentsList` is `[[a, b], [c, d], [e, f]]`, `begin` is `0`, and
`end` is `-1`, this creates `[g, h]`. This `g` is from `a`, `c`, and `e`.
This `h` is from `b`, `d`, and `f`.
@param {ForkContext} context An instance.
@param {number} begin The first index of the previous segments.
@param {number} end The last index of the previous segments.
@param {Function} create A factory function of new segments.
@returns {CodePathSegment[]} New segments.