Handbook
Glossary
prerelease<=> ( semver1 semver2 -- <=> )
Vocabulary
semver
.
private
Inputs
semver1
an
object
semver2
an
object
Outputs
<=>
an
object
Definition
USING:
accessors
combinators
kernel
math.order
math.parser
sequences
sequences.extras
splitting
;
IN:
semver.private
:
prerelease<=>
( semver1 semver2 -- <=> )
[
prerelease>>
]
bi@
{
{
[
over
empty?
]
[
nip
empty?
+eq+
+gt+
?
]
}
{
[
dup
empty?
]
[
2drop
+lt+
]
}
[
[
"."
split
[
[
string>number
]
keep
or
]
map
]
bi@
zip-longest
[
first2
{
{
~quotation~ ~quotation~
}
{
~quotation~ ~quotation~
}
{
~quotation~ ~quotation~
}
{
~quotation~ ~quotation~
}
{
~quotation~ ~quotation~
}
{
~quotation~ ~quotation~
}
[
2drop
+eq+
]
}
cond
dup
+eq+
eq?
[
drop
f
]
when
]
map-find
drop
+eq+
or
]
}
cond
;
inline