Handbook
Glossary
classes< ( seq1 seq2 -- lt/eq/gt )
Vocabulary
multi-methods
Inputs
seq1
an
object
seq2
an
object
Outputs
lt/eq/gt
an
object
Definition
USING:
classes.algebra
combinators
kernel
math.order
sequences
;
IN:
multi-methods
:
classes<
( seq1 seq2 -- lt/eq/gt )
[
{
{
[
2dup
eq?
]
[
+eq+
]
}
{
[
2dup
[
class<=
]
[
swap
class<=
]
2bi
and
]
[
+eq+
]
}
{
[
2dup
class<=
]
[
+lt+
]
}
{
[
2dup
swap
class<=
]
[
+gt+
]
}
[
+eq+
]
}
cond
2nip
]
2map
[
+eq+
eq?
not
]
find
nip
+eq+
or
;