Take this function:
(defun sum-greater (x y z)
(> (+ x y) z))
It's my understanding that in LISP the first element in a list always represents a function to be performed on the subsequent atoms/lists. So why doesn't LISP treat the x
in (x y z)
as a function to be performed on y
and z
. Clearly this would not be desirable behavior, but it would be the expected behavior.
Presumably the function that defines defun
somehow overrides the standard LISP evaluation of a list? If so, could you detail this?
Thanks
IIRC in Common Lisp at least defun
is a macro (HyperSpec), meaning it may define any evaluation strategy whatsoever for its arguments.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With