Defaults for equality operators
Posted: Sat Dec 23, 2006 11:42 pm
Lutz,
I would like to suggest modifying the equality operators so that they behave differently when presented with a single number as input. Currently an expression like (< 3) always returns true. If n is an input I want to propose that the equality operators behave as follows:
(f n) is (f n 0) where f are the operators <.<=,>,>=,=,!=
This makes testing a number simple to see if it is negative, strictly positive, etc.
I would like to suggest modifying the equality operators so that they behave differently when presented with a single number as input. Currently an expression like (< 3) always returns true. If n is an input I want to propose that the equality operators behave as follows:
(f n) is (f n 0) where f are the operators <.<=,>,>=,=,!=
This makes testing a number simple to see if it is negative, strictly positive, etc.