Hi All, How to define a new unary operator. E.g: I want to use "/\" for intersection over a list of sets and similarly "\/" for union over a list of sets. I searched haskell98 report but couldn't find any pointers. Please let me know if it's allowed in the first place, if yes then how Regards, -- Arun Kumar S Jadhav Masters Student, SIC-309, KReSIT, IIT-Bombay, Ph: 022-25764967 http://www.it.iitb.ac.in/~arunk ***************************** Never negotiate out of fear Never fear to negotiate *****************************
On Monday, 2003-07-07, 09:46, CEST, Arun Kumar S Jadhav wrote:
Hi All, How to define a new unary operator.
The only unary operator in Haskell is unary minus for negating numbers. There are no other predefined unary operators and it is not possible to define any. So unary minus is rather an exception in the Haskell language. But note that because of the way, function application is written, one can have notations similar to unary operators. For instance, there is not :: Bool -> Bool and not <expression> looks like applying an unary not operator.
[...]
Wolfgang
participants (2)
-
Arun Kumar S Jadhav -
Wolfgang Jeltsch