Hi,

the user manual says this (VARIABLES section):

"Operators like + are also valid identifiers, but are parsed
specially. In some contexts, operators can be used just like variables;
for example (+) refers to the addition function, and (+) = f will
reassign it."

This looks like Haskell's bridge between the infix and prefix
syntax. However, it seems that contrary to what the manual says, you
don't need the parenthesis, i.e. I can do just x = f. So is there a real
reason for using (+) ?

Also another question: is it possible, as in Haskell, to define new
infix operators, or are you restricted[1] to the built-in ones ?

Thanks.


Footnotes: 
[1]  by "restricted" here, I don't mean to say that there are too few of
them; I'm aware the unicode ones are available.

-- 
Resistance is futile. You will be jazzimilated.

Lisp, Jazz, Aïkido: http://www.didierverna.info

Reply via email to