[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Questions about (function eq)
- To: common-lisp@SAIL.STANFORD.EDU
- Subject: Questions about (function eq)
- From: Michael Greenberg <GREENBERG%cs.umass.edu@RELAY.CS.NET>
- Date: Wed, 1 Jul 87 14:25 EDT
I have several questions concerning the difference between
(pushnew 'foo bar :test #'eq)
and
(pushnew 'foo bar :test 'eq)
What are the semantic differences? Is there
a difference between
(defun xyz ()
(flet ((eq (a b) (bar a b)))
(pushnew 'foo bar :test #'eq)))
and
(defun xyz ()
(flet ((eq (a b) (bar a b)))
(pushnew 'foo bar :test 'eq)))
What are the stylistic differences?
Which of the following macro definitions
is preferred? Why?
(defmacro foo (fn)
(if (eq fn 'eq)
'(expansion-1 ...)
'(expansion-2 ...)))
(defmacro foo (fn)
(if (eq fn #'eq)
'(expansion-1 ...)
'(expansion-2 ...)))
(defmacro foo (fn)
(if (or (eq fn #'eq) (eq fn 'eq))
'(expansion-1 ...)
'(expansion-2 ...)))
Michael Greenberg
greenberg@cs.umass.edu