overlayRange static method

List<A1Range> overlayRange(
  1. List<A1Range> ranges,
  2. A1Range range
)

Special case of overlayRanges where we are overlaying an A1Range on a list of A1Ranges

Implementation

static List<A1Range> overlayRange(List<A1Range> ranges, A1Range range) {
  if (ranges.isEmpty) return [range];
  return ranges.first.overlayRanges([...ranges.skip(1), range]);
}