lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 10 July 2014 08:03, Paige DePol <lual@serfnet.org> wrote:
What other strange operators have been spotted in the wild?

In SML ~ is the unary negative.  You don't write -5.  You write ~5. 

- -5;
stdIn:12.1 Error: _expression_ or pattern begins with infix identifier "-"
stdIn:12.1-12.3 Error: operator and operand don't agree [literal]
  operator domain: 'Z * 'Z
  operand:             int
  in _expression_:
    - 5
- ~5;
val it = ~5 : int

--
"Perhaps people don't believe this, but throughout all of the discussions of entering China our focus has really been what's best for the Chinese people. It's not been about our revenue or profit or whatnot."
--Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.