mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-18 00:31:57 +03:00
15 lines
363 B
Idris
15 lines
363 B
Idris
import System.File
|
|
import Data.Strings
|
|
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
|