Arc Forumnew | comments | leaders | submitlogin
Comparison operator inconsistencies
6 points by parenthesis 6130 days ago | 1 comment
<= and >= will take any number of arguments, including zero or one, returning t unless there is an argument out of order. This is how it should be imho.

But > and < require at least two arguments. (I think because they are just scheme's > and < .)

Also is requires at least one argument. Again, it should allow zero (then returning t, as none of the arguments are different (in the relevant sense)).

And iso requires exactly two arguments!

And, unrelatedly,

  (type 2.0) -> int
!?


2 points by chaos 6130 days ago | link

    (type 2.0) -> int
Choosing the best possible type for numbers is imho a good thing. And it's (probably) taken directly from mzscheme.

    (type 2.1) -> num
    (integer? 2.0) -> #t

-----