Compute the superset Your task here is simple:

Given a list of integer sets, find the set union.  In other words, find the shortest list of integer sets that contain all the elements in the original list of sets (but no other elements).  For example:

[1,5] and [3,9] becomes [1,9] as it contains all of the elements in both [1,5] and [3,9]
[1,3] and [5,9] stays as [1,3] and [5,9], because you don't want to include 4


Sets are notated using range notation: [1,4] means the integers 1,2,3,4.  Sets can also be unbounded: [3,] means all of the integers &gt;= 3, and [,-1] means all of the integers &lt;= -1.  It is guaranteed that the first element of the range will not be greater than the second.

You can choose to take sets in string notation, or you can use 2-element tuples, using a constant non-integer as the "infinite" value. You can use two distinct constants to represent the infinite upper bound and the infinite lower bound. For example, in Javascript, you could use [3,{}] to notate all integers &gt;= 3, as long as you consistently used {} across all test cases.

Test cases:

[1,3]                     =&gt; [1,3]
[1,]                      =&gt; [1,]
[,9]                      =&gt; [,9]
[,]                       =&gt; [,]
[1,3],[4,9]               =&gt; [1,9]
[1,5],[8,9]               =&gt; [1,5],[8,9]
[1,5],[1,5]               =&gt; [1,5]
[1,5],[3,7]               =&gt; [1,7]
[-10,7],[1,5]             =&gt; [-10,7]
[1,1],[2,2],[3,3]         =&gt; [1,3]
[3,7],[1,5]               =&gt; [1,7]
[1,4],[8,]                =&gt; [1,4],[8,]
[1,4],[-1,]               =&gt; [-1,]
[1,4],[,5]                =&gt; [,5]
[1,4],[,-10]              =&gt; [1,4],[,-10]
[1,4],[,]                 =&gt; [,]
[1,4],[3,7],[8,9],[11,20] =&gt; [1,9],[11,20]


This is code-golf, so make your answer as short as possible!
R + intervals, 90 87 81 bytes



function(...)t(reduce(Intervals(rbind(...),type="Z")))+c(1,-1)
library(intervals)


Try it online!

Input is a list of intervals. -Inf and Inf are R built-ins for minus/plus infinity. Output is a matrix of columns of intervals.

Not usually a fan of using non-standard libraries but this one was fun. TIO doesn't have intervals installed. You can try it on your own installation or at https://rdrr.io/snippets/ 

The intervals package supports real and integer (type = "Z") intervals and the reduce function is a built-in for what the challenge wants, but the output seems to default to open intervals, so close_intervals +c(1,-1) is needed to get the desired result.

Old version had examples in list of lists which might be convenient so I've left the link here.