[Haskell-cafe] How to print a string (lazily)
Glynn Clements
glynn at gclements.plus.com
Wed Jan 4 02:18:15 EST 2006
Donn Cave 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 mean, we all know its type and
> semantics, whatever you want to call them, but if we want to put names
> to things, I had the impression that the IO monad is designed to work
> in a pure functional language - so that the functions are indeed actually
> pure, including putStr.
putStr is a pure function, but it isn't a "pure function" ;)
OTOH, getLine isn't even a function, just a value.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the Haskell-Cafe
mailing list