7 Jul
2005
7 Jul
'05
12:07 p.m.
mt wrote:
hi,
i'd like to know how to write simply a line-based interactive program, that is one with which you have a 'talk'.
I would start with: main = do putStrLn "Please enter text (or press return to exit):" s <- getLine if s /= "" then do putStrLn s main else return ()
a simple filter-like line-based program ca be written as:
-- a filter program process an entire input to yield some output type FilterProgram = [Line] -> [Line]
Forget this, if it's not an (old) exercise Christian