RosettaCodeData/Task/Anagrams/PicoLisp/anagrams-2.l

9 lines
278 B
Text
Raw Permalink Normal View History

(let Words NIL
(in "unixdict.txt"
(while (line)
(let (Word (pack @) Key (pack (sort @)))
(if (idx 'Words Key T)
(push (car @) Word)
(set Key (list Word)) ) ) ) )
(flip (by length sort (mapcar val (idx 'Words)))) )