mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-24 12:14:26 +03:00
15 lines
362 B
Idris
15 lines
362 B
Idris
import System.File
|
|
import Data.String
|
|
import Data.List
|
|
|
|
main : IO ()
|
|
main = do
|
|
putStrLn "input file: "
|
|
file<-getLine
|
|
Right tocheck<-readFile file
|
|
| Left err => putStrLn $show err
|
|
Right dict<-readFile "words"
|
|
| Left err => putStrLn $show err
|
|
let diff = filter (\s=>not $ s `elem` words dict) $ words tocheck
|
|
putStrLn $ show diff
|