10

In C and C++, the ! negates the result:

if( !( a == b ) )

In Scheme, I found only eq?. How do I say "not equal"? Or we have to explicitly say

(eq? #f (eq? expr expr))

2 Answers 2

23

Scheme has a not, so you could do: (not (eq? expr1 expr2))

0
-9

Could you not have tried guessing?

(not #f) ==> #t
3
  • While I trust You meant no offense, the diplomacy of comments is sometimes hard to distinguish from demeaning remarks on the internet unless worded in a clear enough fashion.
    – xuinkrbin.
    Apr 16, 2013 at 15:37
  • 1
    I guessed it was (negate #f) ==> #t. As it did not work, I found this question helpful. Sep 11, 2014 at 16:10
  • not #f does not means something is true, just that the program may have been unable to render a false.
    – user4747724
    May 5, 2016 at 0:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.