gpt4 book ai didi

scheme - 你如何在 Scheme 中表达 bool 否定?

转载 作者:行者123 更新时间:2023-12-04 10:11:49 26 4
gpt4 key购买 nike

在 C 和 C++ 中,!否定结果:

if( !( a == b ) )

在Scheme中,我发现只有 eq? . “不等于”怎么说?或者我们必须明确地说
(eq? #f (eq? expr expr))

最佳答案

方案有一个 not ,所以你可以这样做:(not (eq? expr1 expr2))

关于scheme - 你如何在 Scheme 中表达 bool 否定?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5750832/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com