Handbook
Glossary
>semver ( obj -- semver )
Vocabulary
semver
Inputs
obj
an
object
Outputs
semver
an
object
Definition
IN:
semver
GENERIC:
>semver
( obj -- semver )
Methods
USING:
semver
;
M:
semver
>semver
;
USING:
combinators.short-circuit
kernel
math
math.parser
semver
sequences
splitting
strings
;
M:
string
>semver
dup
"+"
split1
[
"-"
split1
]
dip
[
"."
split
[
string>number
]
map
dup
{
[
length
3
=
]
[
[
integer?
]
all?
]
}
1&&
[
nip
first3
]
[
drop
malformed-semver
]
if
]
2dip
semver
boa
;