[Haskell] line-based interactive program

Bulat Ziganshin bulatz at HotPOP.com
Thu Jul 7 10:36:30 EDT 2005


Hello Colin,

Thursday, July 07, 2005, 4:33:39 PM, you wrote:
>>>type FilterProgram = [Line] -> [Line]

CR> interact :: (String -> String) -> IO ()

and there is lines and unlines functions to do just what yopu need

example: main = interact (unlines.filter(not.null).lines)





-- 
Best regards,
 Bulat                            mailto:bulatz at HotPOP.com





More information about the Haskell mailing list