Words containing "the" substring: Difference between revisions
Content added Content deleted
(→{{header|Haskell}}: added solution) |
|||
Line 976: | Line 976: | ||
32: weatherstripping |
32: weatherstripping |
||
</pre> |
</pre> |
||
=={{header|Haskell}}== |
|||
<lang haskell>import System.IO (readFile) |
|||
import Data.List (isInfixOf) |
|||
main = do |
|||
txt <- readFile "unixdict.txt" |
|||
let res = [ w | w <- lines txt, isInfixOf "the" w, length w > 11 ] |
|||
putStrLn $ show (length res) ++ " words were found:" |
|||
mapM_ putStrLn res</lang> |
|||
<pre>λ> main |
|||
32 words were found: |
|||
authenticate |
|||
chemotherapy |
|||
chrysanthemum |
|||
clothesbrush |
|||
clotheshorse |
|||
eratosthenes |
|||
featherbedding |
|||
featherbrain |
|||
featherweight |
|||
gaithersburg |
|||
hydrothermal |
|||
lighthearted |
|||
mathematician |
|||
neurasthenic |
|||
nevertheless |
|||
northeastern |
|||
northernmost |
|||
otherworldly |
|||
parasympathetic |
|||
physiotherapist |
|||
physiotherapy |
|||
psychotherapeutic |
|||
psychotherapist |
|||
psychotherapy |
|||
radiotherapy |
|||
southeastern |
|||
southernmost |
|||
theoretician |
|||
weatherbeaten |
|||
weatherproof |
|||
weatherstrip |
|||
weatherstripping</pre> |
|||
=={{header|JavaScript}}== |
=={{header|JavaScript}}== |