September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
27
Task/Soundex/PicoLisp/soundex-2.l
Normal file
27
Task/Soundex/PicoLisp/soundex-2.l
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
(de soundex (Str)
|
||||
(let (Str (chop Str) Last)
|
||||
(pack
|
||||
(pad
|
||||
-4
|
||||
(cons
|
||||
(uppc (car Str))
|
||||
(head
|
||||
3
|
||||
(filter
|
||||
gt0
|
||||
(cdr
|
||||
(mapcar
|
||||
'((C)
|
||||
(and
|
||||
(setq C
|
||||
(case (uppc C)
|
||||
(`(chop "AEIOUY") 0)
|
||||
(`(chop "BFPV") 1)
|
||||
(`(chop "CGJKQSXZ") 2)
|
||||
(("D" "T") 3)
|
||||
("L" 4)
|
||||
(("M" "N") 5)
|
||||
("R" 6) ) )
|
||||
(<> Last C)
|
||||
(setq Last C) ) )
|
||||
Str ) ) ) ) ) ) ) ) )
|
||||
Loading…
Add table
Add a link
Reference in a new issue