interval-union ( i1 i2 -- i3 )
Factor handbook » The language » Numbers » Intervals » Set-theoretic operations on intervals

Prev:interval-intersect ( i1 i2 -- i3 )
Next:interval-closure ( i1 -- i2 )


Vocabulary
math.intervals

Inputs
i1an interval
i2an interval


Outputs
i3an interval


Word description
Outputs the smallest interval containing the set-theoretic union of i1 and i2 (the union itself may not be an interval).

Examples
USING: math.intervals prettyprint ; 1 5 [a,b] 10 15 [a,b] interval-union .
T{ interval { from { 1 t } } { to { 15 t } } }

USING: math.intervals prettyprint ; empty-interval empty-interval interval-union .
empty-interval


See also
interval-intersect

Definition