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

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

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -