Textonyms: Difference between revisions
Content added Content deleted
m (→{{header|Haskell}}: generalised a little) |
|||
Line 919: | Line 919: | ||
(head . show <$> [2 ..]) |
(head . show <$> [2 ..]) |
||
(words "abc def ghi jkl mno pqrs tuv wxyz") |
(words "abc def ghi jkl mno pqrs tuv wxyz") |
||
ambigousAndLongerSamples :: Int |
|||
-> [[(String, String)]] |
|||
-> [[[(String, String)]]] |
|||
ambigousAndLongerSamples n textonyms = |
|||
⚫ | |||
⚫ | |||
--------------------------- TEST --------------------------- |
--------------------------- TEST --------------------------- |
||
Line 940: | Line 948: | ||
] |
] |
||
let [ambiguous, longer] = ambigousAndLongerSamples 5 textonyms |
|||
let digitCount = length . snd . head |
|||
⚫ | |||
[ambiguous, longer] = |
|||
⚫ | |||
⚫ | |||
⚫ | |||
mapM_ putStrLn $ |
mapM_ putStrLn $ |
||
"Five most ambiguous:" : |
"Five most ambiguous:" : |