Find function's arity in Common Lisp
问题 I've been doing some Genetic Programming and I've been separating functions into different function sets based on their arity; it's all rather complex. I'd like to know if there's a simpler way to to do it. For example, if there's a function that returns the arity of a given function. Cheers in advance. 回答1: For interpreted functions you should be able to use function-lambda-expression. For compiled functions, alas, this function often returns nil , so you will have to use an implementation