How can i get a lambda list specification of a some function parameters, or at least a number of arguments it takes?
For example:
(defun a (a b) )
(get-arg-list #'a) ;-> '(a b)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Common Lisp provides the function
FUNCTION-LAMBDA-EXPRESSIONwhich may be able to recover the source expression, which then includes the lambda list.LispWorks has defined a function
FUNCTION-LAMBDA-LISTwhich returns the arglist.Many other implementations have some form of
ARGLISTfunction in some internal package.Many Common Lisp users use SLIME, a very clever editor extension for the GNU Emacs editor. It has a backend for Common Lisp called SWANK. The SWANK sources provide all kinds of interfaces to the various Common Lisp implementations, including getting the arglist of functions.