RosettaCodeData/Task/Anagrams/Transd/anagrams.transd
2023-07-01 13:44:08 -04:00

17 lines
455 B
Text

#lang transd
MainModule: {
_start: (λ
(with fs FileStream() words String()
(open-r fs "/mnt/proj/tmp/unixdict.txt")
(textin fs words)
( -|
(split words)
(group-by (λ s String() -> String() (sort (cp s))))
(regroup-by (λ v Vector<String>() -> Int() (size v)))
(max-element)
(snd)
(textout)
)
))
}