Report a paste

Please put a quick comment for the admin.

If it looks like spam, the admin will mark it as spam so that the spam filter picks it up in the future.

If the paste contains something private or offensive, it'll probably just be deleted.

No title

module Main where

main :: IO ()
main = do
    let list = []
    list' <- fillList list
    mapM_ putStrLn list'

fillList :: [String] -> IO [String]
fillList strings = do
    newLine <- getLine
    if newLine == "EOF"
       then return strings
       else fillList (strings ++ [newLine])

-- main :: IO ()
-- main = do
--     line <- getLine
--     putStrLn $ "line: " ++ line
--     let list :: [String]
--         list = []
--     if line == "EOF"
--         then return ()
--         else do
--                 putStrLn $ "list: " ++ show list
--                 let list = list ++ [line]
--                 putStrLn $ "list': " ++ show list
--                 main
-- 
--     printList list
-- 
-- printList list = do
--     if list == []
--         then return ()
--         else do
--             putStrLn (head list)
--             printList (tail list)
-- 
--