Unary operators [was: Re: ~ patterns]

Bulat Ziganshin bulatz at HotPOP.com
Fri Feb 3 04:34:59 EST 2006


Hello Benjamin,

Friday, February 03, 2006, 2:29:47 AM, you wrote:

(+ x) --->> (? + x)

i like this idea! but i tink that it's too late for such incompatible change :(

really, unary operators can be added to language without any troubles.
we need only to prohibit using of the same symbol for unary and binary
operators:

unary 9 #

#n = n-1

f = #1-1

we can even allow prefix and postfix operators as long as they all have
different names


-- 
Best regards,
 Bulat                            mailto:bulatz at HotPOP.com





More information about the Haskell-prime mailing list