[Haskell-cafe] What are side effects in Haskell?

Reiner Pope reiner.pope at gmail.com
Fri Jan 2 18:47:48 EST 2009

2009/1/3 Conal Elliott <conal at conal.net>:
> Are there other thoughts & insights about the source of the idea that
> "everything is a function"?

Lazy evaluation can make values seem like functions, given that
laziness can be modeled in a strict imperative language by 0-argument

Also, in an uncurried language, decreasing the number of arguments to
a function, still keeps it a function, eg
   foo(int a, int b);  // 2 arguments
   foo(int a);   // 1 argument
   foo();   // 0 arguments, but still a function
In a strict language, there is a distinction between 0-argument
functions and values; there isn't in Haskell, but it is still nice to
maintain the idea of "0-argument functions" in Haskell -- which are
just values.


More information about the Haskell-Cafe mailing list