Created
March 14, 2012 07:53
-
-
Save m2ym/2034942 to your computer and use it in GitHub Desktop.
Walker and lexical environment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (in-package :cl-user) | |
| (#+sbcl | |
| sb-walker:walk-form | |
| #+allegro | |
| excl::walk-form | |
| `(let ((x 1)) | |
| (declare (fixnum x)) | |
| :marker) | |
| nil | |
| (lambda (subform context env) | |
| (declare (ignore context)) | |
| (when (eq subform :marker) | |
| (multiple-value-list | |
| #+sbcl | |
| (sb-cltl2:variable-information 'x env) | |
| #+allegro | |
| (sys:variable-information 'x env)))) | |
| subform)) | |
| ; SBCL: | |
| ; (NIL NIL NIL) | |
| ; Allegro CL: | |
| ; (:LEXICAL NIL ((TYPE (INTEGER -1152921504606846976 1152921504606846975))) T) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment