static merge(intervals) {
    const [found, final] = intervals
      .sort((a, b) => a.s - b.s)
      .reduce(
        ([sofar, current], item) => {
          if (!current) {
            return [sofar, item];
          } else if (current.overlaps(item) || current.abutsStart(item)) {
            return [sofar, current.union(item)];
          } else {
            return [sofar.concat([current]), item];
          }
        },
        [[], null]
      );
    if (final) {
      found.push(final);
    }
    return found;
  }
Merge an array of Intervals into an equivalent minimal set of Intervals.
Combines overlapping and adjacent Intervals.
The resulting array will contain the Intervals in ascending order, that is, starting with the earliest Interval
and ending with the latest.

@param {Array} intervals
@return {Array}