0

Please look at the following elisp expressions.

(funcall 'lambda '() 1)
;; or
(apply 'lambda '() 1 ())

The interpreter says that lambda is not a valid function for both the above expressions. Why? Is it because lambda is a macro? If so, is there a variant of funcall/apply for macros?

2
0

Yes, lambda is a macro. There is a function that is like funcall for macros called eval.

3
  • Isn't there one for apply? Or a way to convert a list into its elements, prefereably without evaluating them? – nomad Sep 27 '20 at 5:58
  • No, eval is not split into two variants like funcall and apply. I have no idea what you mean about converting a list to it's elements; if you want to access the elements of a list you can use nth or, car and cdr. Perhaps you need to ask a better question, one that is focused on what you actually want to accomplish instead of random primitive operations. For more information about primitives, you can open the Elisp manual inside Emacs with C-h i. – db48x Sep 27 '20 at 6:17
  • Alright, thanks for reply. Maybe we can chat. – nomad Sep 27 '20 at 6:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.