multiwayUnion

fnauto multiwayUnion(alias less = "a < b", RangeOfRanges)(RangeOfRanges ror)

Computes the union of multiple ranges. The

input ranges are passed

as a range of ranges and each is assumed to be sorted by less. Computation is done lazily, one union element at a time. multiwayUnion(ror) is functionally equivalent to multiwayMerge(ror).uniq.

"The output of multiwayUnion has no duplicates even when its inputs contain duplicates."

Parameters

lessPredicate the given ranges are sorted by.
rorA range of ranges sorted by less to compute the intersection for.

Returns

A range of the union of the ranges in ror.

See also: multiwayMerge