Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想问一下——在elisp中从零到零的零转换函数是什么?
我是新手,我想我正在用我的代码发明轮子:
(defun chgnull (x) (if (null x) 0 1)) (mapcar 'chgnull '(1 2 nil))
通过关键字“to zero”搜索 Emacs 源,但没有显示任何相关内容。
(or x 0)如果x为 nil,则表达式的值为 0,x否则为 0。
(or x 0)
x