RosettaCodeData/Task/Anagrams/Transd/anagrams.transd

18 lines
455 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
#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)
)
))
}