I use sbcl+emacs+slime.
I writing a function in lisp,
I use C-c C-c compile, but i've already deleted it.
I can't find it. I want to know how I define it.
I tried use function-lambda-expression, but I get this:
(function-lambda-expression #'b)
T
B
I hope someone can give me some help.Thanks very much in advance!
Thanks Vsevolod.
If function define in repl, i can use (descri #'function-name) get how i define the function, but if i through C-c C-c define it, i just get source file
My attempt
Depending on your settings for debug and optimization you may be able to get it via describe:
CL-USER> (defun f (a) (print a))
F
CL-USER> (describe #'f)
#<FUNCTION F>
[compiled function]
Lambda-list: (A)
Derived type: (FUNCTION (T) (VALUES T &OPTIONAL))
Source form:
(SB-INT:NAMED-LAMBDA F
(A)
(BLOCK F (PRINT A)))
You can see the definition here in the Source form part.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With