Handbook
Glossary
(make-pair) ( prev next min max -- next' )
Vocabulary
ui
.
gadgets
.
charts
.
lines
.
private
Inputs
prev
an
object
next
an
object
min
an
object
max
an
object
Outputs
next'
an
object
Definition
USING:
arrays
combinators
kernel
make
math.order
sequences
;
IN:
ui.gadgets.charts.lines.private
::
(make-pair)
( prev next min max -- next' )
prev next min max prev next
[
first
y
min max
between<=>
]
bi@
2array
{
{
{
+gt+
+eq+
}
[
fix-right-chunk
]
}
{
{
+lt+
+eq+
}
[
fix-right-chunk
]
}
{
{
+eq+
+gt+
}
[
fix-left-chunk
,
next
]
}
{
{
+eq+
+lt+
}
[
fix-left-chunk
,
next
]
}
{
{
+gt+
+lt+
}
[
2-point-chunk
,
next
]
}
{
{
+lt+
+gt+
}
[
2-point-chunk
,
next
]
}
[
drop
"same values - can't happen"
throw
]
}
case
;