[Haskell] line-based interactive program
maeder at tzi.de
Thu Jul 7 08:07:28 EDT 2005
> 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:
do putStrLn "Please enter text (or press return to exit):"
s <- getLine
if s /= "" then do
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
More information about the Haskell