[Haskell] line-based interactive program

Colin Runciman colin at cs.york.ac.uk
Thu Jul 7 08:33:39 EDT 2005


Christian Maeder wrote:

>>-- a filter program process an entire input to yield some output
>>type FilterProgram = [Line] -> [Line]
>>    
>>
>
>Forget this, if it's not an (old) exercise
>  
>
Yes, people don't write lazy functional programs in Haskell any more. 
In the Era of Monadic Enlightenment, obfuscated imperative programming
is the Way To Go.  :-\  :-)

However, for those who like to indulge the odd moment of nostalgia, in
the Haskell 98 Prelude there is:

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

If this function does not work correctly with the Haskell implementation
you use, do report the fault to the implementors.

Colin R
(purveyor of old exercises)



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org//pipermail/haskell/attachments/20050707/fd97327c/attachment.htm


More information about the Haskell mailing list