How do I ask the Lisp compiler to ignore a (label-variety) function?

半腔热情 提交于 2019-12-05 12:25:18

GNU CLISP is asking you to declare the function to be ignored.

(defun x ()
  (labels ((y ()))
    (declare (ignore (function y)))
    5))

Alternatively (especially if this is the result of a macro expansion where it depends on the user whether y is actually used or not),

(defun x ()
  (labels ((y ()))
    (declare (ignorable (function y)))
    5))

(Wherever you are expected to write (function y), you are free to use the reader abbreviation #'y instead.)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!