Looking at >
in Racket, the following makes sense:
> (> 5 0)
#t
Why does the following evaluate to false?
> (> 5 0 0)
#f
Because (> 5 0 0)
is the same as:
(and (> 5 0) (> 0 0))
...Which is #f
. For comparison, evaluate (>= 5 0 0)
and you'll see that it returns #t
.
Pronounce >
as strictly decreasing and >=
as non-increasing.
Then it becomes easy to see that (> 5 0 0)
is false.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With