[Haskell-cafe] How to print a string (lazily)
ahey at iee.org
Tue Jan 3 13:15:39 EST 2006
On Tuesday 03 Jan 2006 6:11 pm, Donn Cave wrote:
> On Tue, 3 Jan 2006, Chris Kuklewicz wrote:
> > I sometimes call a function with side-effects in IO a "command". But
> > the terms are fungible. But calling putStr a "function" is correct. It
> > is not a "pure function" however.
> Is that the standard party line?
I don't think so. putStr certainly is a pure function.
main :: IO ()
main = let action = putStr "Bye"
in action `seq` action
..and see what happens.
More information about the Haskell-Cafe