File tree 1 file changed +2
-5
lines changed
1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
(init-unit-test)
4
4
5
- (eval-when (compile ) ; ; this does not work on compiled code
6
- (when nil
7
-
8
5
; ;(defun make-c (a) (let ((x 0)) #'(lambda () (list a x))))
9
6
; ;(defun make-c () (let ((x 0)) #'(lambda () (list x))))
10
7
(defun make-c0 () #' (lambda () (list 0 )))
16
13
(format t " ;; funcall make-c0 ~A~% " (funcall f0))
17
14
(assert (equal (funcall f0) ' (0 ))))
18
15
16
+
19
17
(defun make-c1 () (let () #' (lambda (x) (list x))))
20
18
21
19
(compile ' make-c1)
25
23
(format t " ;; funcall make-c1 ~A~% " (funcall f1 1 ))
26
24
(assert (equal (funcall f1 1 ) ' (1 ))))
27
25
26
+
28
27
(defun make-c2 () (let ((x 0 )) #' (lambda () (list x))))
29
28
30
29
(compile ' make-c2)
52
51
(format t " ;; funcall make-c4 ~A~% " (funcall f4 1 ))
53
52
(assert (equal (funcall f4 1 ) ' (1 ))))
54
53
55
- )) ; ; eval-when (compile) (when nil
56
-
57
54
(deftest lambda-in-lambda
58
55
(let (r)
59
56
(setq r
You can’t perform that action at this time.
0 commit comments