lisp - How to defun a function within a defun? -


for example, pass function name function

(personal-function 'func-name '(attr1 attr2 ...)) 

and want

(defun personal-function (func-name)      (defun func-name '(attr1 attr2 ...) (dosomething))) 

however, said can't defun symbol... should do?

use

(setf (symbol-function my-symbol) some-function) 

create new function with

(compile nil (list 'lambda args body)) 

where args , body have meaningful values.


Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -