Handbook
Glossary
minmax-relative ( seq k -- lt eq gt lt-max gt-min )
Vocabulary
math
.
statistics
Inputs
seq
an
object
k
an
object
Outputs
lt
an
object
eq
an
object
gt
an
object
lt-max
an
object
gt-min
an
object
Definition
USING:
combinators
generalizations
kernel
math
math.order
sequences
;
IN:
math.statistics
:
minmax-relative
( seq k -- lt eq gt lt-max gt-min )
[
0 0 0 -1/0. 1/0.
]
2dip
[
[
dup
]
]
dip
[
<=>
{
{
+lt+
[
[
1
+
]
5
ndip
[
max
]
curry
dip
]
}
{
+gt+
[
[
1
+
]
3dip
min
]
}
{
+eq+
[
[
1
+
]
4dip
drop
]
}
}
case
]
curry
compose
each
;