Handbook
Glossary
integral-closure ( i1 -- i2 )
Factor handbook
»
The language
»
Numbers
»
Intervals
»
Set-theoretic operations on intervals
Prev:
interval-closure ( i1 -- i2 )
Vocabulary
math
.
intervals
Inputs
i1
an
interval
with integer end-points
Outputs
i2
a closed
interval
with integer end-points
Word description
Outputs a closed interval which is equal as a set to
i1
, when
i1
is viewed as an interval over in integers (that is, a discrete set).
Definition
USING:
accessors
kernel
math
sequences
;
IN:
math.intervals
:
integral-closure
( i1 -- i2 )
dup
special-interval?
[
[
from>>
first2
[
1
+
]
unless
]
[
to>>
first2
[
1
-
]
unless
]
bi
[a,b]
]
unless
;