clojure - Clojure 的 bit-and-not 有什么作用?

标签 clojure

来自docs :

bit-and-not

function

Usage: (bit-and-not x y)
       (bit-and-not x y & more)

Bitwise and with complement

Added in Clojure version 1.0

Clojure 的其他位函数对我来说很有意义,但我不明白这个。

最佳答案

相当于:

(位和 x(位不是 y))

该函数可用于进行子集测试。当且仅当 (bit-and-not a b) 为零。

关于clojure - Clojure 的 bit-and-not 有什么作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16630750/

相关文章:

macros - 使用宏绑定(bind) getter 和 setter

clojure - Clojure 中函数的组合和部分组合

clojure - 合并两个复杂的数据结构

clojure - 为什么我无法在 intellij idea ID 中启动黑色服务器..?

clojure - Lisp解释时 "reader"的任务是什么?

clojure - 从 jar 导入 clojure 函数

clojure - 如何创建索引以快速访问 clojure 哈希表?

web-services - Clojure 中 Web 服务的异步作业队列

ubuntu - 如何使用 nginx 服务 Clojure 页面

list - Clojure 瞬变 - 关联!导致异常