parameter-list

Find function's arity in Common Lisp

丶灬走出姿态 提交于 2019-12-18 07:45:32
问题 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

LISP - Program to search a specific function through its parameters

半腔热情 提交于 2019-12-12 10:08:29
问题 For a course project I got to write a program in lisp. The program should contain the most important lisp functions, their input and output parameters and maybe optional parameters. For example: function - first, input - list, output - object (first member of list). The program should work in 2 different ways: You give the program the name of a function and it should return the function parameters. You enter function parameters and if a function with these parameters exists, it should return

LISP - Program to search a specific function through its parameters

﹥>﹥吖頭↗ 提交于 2019-12-06 07:21:25
For a course project I got to write a program in lisp. The program should contain the most important lisp functions, their input and output parameters and maybe optional parameters. For example: function - first, input - list, output - object (first member of list). The program should work in 2 different ways: You give the program the name of a function and it should return the function parameters. You enter function parameters and if a function with these parameters exists, it should return the name of the function. My questions: What would be the right way to approach a task like this in

Find function's arity in Common Lisp

我与影子孤独终老i 提交于 2019-11-29 13:36:46
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. 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-dependent function ( clocc / port / sys.lisp ): (defun arglist (fn) "Return the signature of the function."