Data update

This commit is contained in:
Ingy dot Net 2024-04-19 16:56:29 -07:00
parent 0df55f9f24
commit aec8ed51b6
1045 changed files with 18889 additions and 2777 deletions

View file

@ -1,4 +1,4 @@
val .csd = f(.code) {
val .csd = fn(.code) {
switch len(.code) {
case 0:
return "nada, zip, zilch"
@ -6,7 +6,7 @@ val .csd = f(.code) {
return "invalid length"
}
if matching(re/[^B-DF-HJ-NP-TV-Z0-9]/, .code) {
if .code -> re/[^B-DF-HJ-NP-TV-Z0-9]/ {
return "invalid character(s)"
}
@ -14,10 +14,10 @@ val .csd = f(.code) {
val .nums = s2n .code
val .sum = for[=0] .i of .nums {
_for += .nums[.i] x .weight[.i]
_for += .nums[.i] * .weight[.i]
}
toString 9 - (.sum - 1) rem 10
string 9 - (.sum - 1) rem 10
}
val .h = h{
@ -50,7 +50,7 @@ for .input in sort(keys .h) {
if len(.d) > 1 {
writeln .input, ": ", .d
} else {
val .expect = toString .h[.input]
val .expect = string .h[.input]
write .input, .d
writeln if .expect == .d {""} else {
$" (SEDOL test failed; expected check digit \.expect;)"}