Handbook
Glossary
valid-vin? ( vin -- ? )
Vocabulary
vin
Inputs
vin
an
object
Outputs
?
an
object
Definition
USING:
assocs
combinators.short-circuit
kernel
math
sequences
vin.private
;
IN:
vin
:
valid-vin?
( vin -- ? )
{
[
length
17
=
]
[
[
"ABCDEFGHJKLMNPRSTUVWXYZ0123456789"
member?
]
all?
]
[
[
8
swap
nth
]
[
WEIGHTS
swap
0
[
TRANSLITERATION
at
*
+
]
2reduce
11
mod
]
bi
dup
10
=
[
drop
88
=
]
[
48
+
=
]
if
]
}
1&&
;