Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
16
Task/Here-document/Haskell/here-document.hs
Normal file
16
Task/Here-document/Haskell/here-document.hs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
main :: IO ()
|
||||
main = do
|
||||
|
||||
-- multiline String
|
||||
putStrLn "Hello\
|
||||
\ World!\n"
|
||||
|
||||
-- more haskell-ish way
|
||||
putStrLn $ unwords ["This", "is", "an", "example", "text!\n"]
|
||||
|
||||
-- now with multiple lines
|
||||
putStrLn $ unlines [
|
||||
unwords ["This", "is", "the", "first" , "line."]
|
||||
, unwords ["This", "is", "the", "second", "line."]
|
||||
, unwords ["This", "is", "the", "third" , "line."]
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue