在 clojure 中,我注意到具有逻辑相反的函数,例如 [[if x if-not] [every? x 不是每个]]。
我想知道为什么不包括 [not-nil?] ,是故意的还是因为它太微不足道了?
从 Clojure 1.6 开始就有some?:
clojure.core/some?
([x])
Returns true if x is not nil, false otherwise.
Run Code Online (Sandbox Code Playgroud)
https://clojuredocs.org/clojure.core/some_q