ABC words: Difference between revisions
Content added Content deleted
(→{{header|Python}}: Added a functionally composed variant.) |
|||
Line 525: | Line 525: | ||
| c == x = Just xs |
| c == x = Just xs |
||
| otherwise = go xs |
| otherwise = go xs |
||
--------------------------- TEST ------------------------- |
--------------------------- TEST ------------------------- |
||
main :: IO () |
main :: IO () |
||
main = |
main = |
||
readFile "unixdict.txt" |
readFile "unixdict.txt" |
||
mapM_ print |
>>= mapM_ print . zip [1 ..] . filter isABC . lines</lang> |
||
{{Out}} |
{{Out}} |
||
<pre>(1,"aback") |
<pre>(1,"aback") |