gpt4 book ai didi

clojure - 为什么没有非零呢?在 Clojure 中?

转载 作者:行者123 更新时间:2023-12-02 10:32:17 25 4
gpt4 key购买 nike

在 clojure 中,我注意到具有逻辑对立的函数,例如 [[if x if-not] [every? x 不是每个]]。

我想知道为什么不包括[not-nil?],是故意的还是因为它太微不足道了?

最佳答案

从 Clojure 1.6 开始有一些?:

clojure.core/some?
([x])
Returns true if x is not nil, false otherwise.

https://clojuredocs.org/clojure.core/some_q

关于clojure - 为什么没有非零呢?在 Clojure 中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27701538/

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