Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
2
Task/Read-entire-file/Haskell/read-entire-file-1.hs
Normal file
2
Task/Read-entire-file/Haskell/read-entire-file-1.hs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
do text <- readFile filepath
|
||||
-- do stuff with text
|
||||
4
Task/Read-entire-file/Haskell/read-entire-file-2.hs
Normal file
4
Task/Read-entire-file/Haskell/read-entire-file-2.hs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
eagerReadFile :: FilePath -> IO String
|
||||
eagerReadFile filepath = do
|
||||
text <- readFile filepath
|
||||
last text `seq` return text
|
||||
Loading…
Add table
Add a link
Reference in a new issue