[Haskell] line-based interactive program
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.
(purveyor of old exercises)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell