Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

30
Task/IBAN/PicoLisp/iban.l Normal file
View file

@ -0,0 +1,30 @@
(setq *Sizes '((GB . 22) (CH . 21) (SA . 24)))
(de iban (Str)
(let Lst
(filter
'((X) (not (sp? X)))
(chop (uppc Str)) )
(when
(=
(cdr (assoc (pack (head 2 Lst)) *Sizes))
(length Lst) )
(%
(format
(mapcar
'((X)
(if (upp? X)
(- (char X) 55)
X ) )
(append (nth Lst 5) (head 4 Lst)) ) )
97 ) ) ) )
(for I '("sa03 8000 0000 6080 1016 7519"
"CH9300762011623852957"
"gb82west1234 56987654 32"
"GB82WEST000")
(if (= 1 (iban I))
(println 'Valid)
(println 'Invalid) ) )
(bye)