
4 Oct
2010
4 Oct
'10
4:48 p.m.
On Mon, Oct 04, 2010 at 02:08:08PM +0200, Daniel Fischer wrote:
On Sunday 03 October 2010 20:11:47, Andrew Sackville-West wrote:
But this is not a property of "undefined" in this context. You've just given it a name that happens to coincide with a reserved word. You could just as easily use "x" or "foo" or whatever in the same way. Note that commonly, if you are not going to use the argument to a function, you use "_" to prevent it from being bound at all.
Minor correction, "undefined" is not a reserved word (like e.g. "data" is), it is just a variable (or name) bound in the Prelude. You can shadow predefined names like undefined, otherwise etc., but not reserved words, so
f data = 3
won't compile while
f undefined = 3
will.
Thanks! A