Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.

get-lambda-expression

get-lambda-expression

type: function (subr) 
location: built-in
source file: xlcont.c
Common LISP compatible: no
supported on: all machines

SYNTAX

(get-lambda-expression <closure> )
        <closure>       -       a closure object from a previously defined 
                                function.

DESCRIPTION

The GET-LAMBDA-EXPRESSION function takes the <closure> object and returns a reconstruction of a LAMBDA or a MACRO expression that defines the <closure>. The parameter must be a <closure> expression (of the the form #<Closure-FUNC #277e2> ).

EXAMPLES

(defun mine (a b) (print (+ a b)))      ; define MINE defun
(get-lambda-expression (function mine)) ; returns (LAMBDA (A B) 
                                        ;           (PRINT (+ A B)))
(get-lambda-expression                  ;
        (lambda (a) (print a))          ; returns (LAMBDA (A) (PRINT A))
(defmacro plus (n1 n2) `(+ ,n1 ,n2))    ; define PLUS macro
(get-lambda-expression (function plus)) ; returns 
                                        ;  (MACRO (N1 N2) 
                                        ;    (BACKQUOTE (+ (COMMA N1) 
                                        ;                  (COMMA N2))))


Go to the first, previous, next, last section, table of contents.