0.pre7.126:
[sbcl.git] / tests / walk.impure.lisp
index 8642df7..c44c1ae 100644 (file)
 (defun take-it-out-for-a-test-walk-1 (form)
   (let ((copy-of-form (copy-tree form))
        (result (walk-form form nil
-                 #'(lambda (x y env)
-                     (format t "~&Form: ~S ~3T Context: ~A" x y)
-                     (when (symbolp x)
-                       (let ((lexical (var-lexical-p x env))
-                             (special (var-special-p x env)))
-                         (when lexical
-                           (format t ";~3T")
-                           (format t "lexically bound"))
-                         (when special
-                           (format t ";~3T")
-                           (format t "declared special"))
-                         (when (boundp x)
-                           (format t ";~3T")
-                           (format t "bound: ~S " (eval x)))))
-                     x))))
+                 (lambda (x y env)
+                   (format t "~&Form: ~S ~3T Context: ~A" x y)
+                   (when (symbolp x)
+                     (let ((lexical (var-lexical-p x env))
+                           (special (var-special-p x env)))
+                       (when lexical
+                         (format t ";~3T")
+                         (format t "lexically bound"))
+                       (when special
+                         (format t ";~3T")
+                         (format t "declared special"))
+                       (when (boundp x)
+                         (format t ";~3T")
+                         (format t "bound: ~S " (eval x)))))
+                   x))))
     (cond ((not (equal result copy-of-form))
           (format t "~%Warning: Result not EQUAL to copy of start."))
          ((not (eq result form))
@@ -935,14 +935,14 @@ Form: NIL   Context: EVAL; bound: NIL
          (with-output-to-string (*standard-output*)
            (let ((the-lexical-variables ()))
              (walk-form '(let ((a 1) (b 2))
-                          #'(lambda (x) (list a b x y)))
+                          (lambda (x) (list a b x y)))
                         ()
-                        #'(lambda (form context env)
-                            (declare (ignore context))
-                            (when (and (symbolp form)
-                                       (var-lexical-p form env))
-                              (push form the-lexical-variables))
-                            form))
+                        (lambda (form context env)
+                         (declare (ignore context))
+                         (when (and (symbolp form)
+                                    (var-lexical-p form env))
+                           (push form the-lexical-variables))
+                         form))
              (or (and (= (length the-lexical-variables) 3)
                       (member 'a the-lexical-variables)
                       (member 'b the-lexical-variables)