开发者

How do you express Boolean negation in Scheme?

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

if( !( a == b ) )

In S开发者_JAVA百科cheme, I found only eq?. How do I say "not equal"? Or we have to explicitly say

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


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


Could you not have tried guessing?

(not #f) ==> #t
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜