我开始使用id
,并且在$(function() {
$("#includedContent").load("Menu.html", function() {
// do stuff
$("li", this).removeClass("disabled");
});
});
循环中使用它时遇到一个奇怪的问题。尽管log4cl
确实显示了方法的名称,但iterate
却是空的。
我想念这里明显的东西吗?还是working
和not-working
的组合中存在错误?
iterate
编辑
我仅在log4cl
上看到此问题。使用(ql:quickload "iterate")
(ql:quickload "log4cl")
(defpackage :minimal
(:use #:cl #:iterate))
(in-package :minimal)
(defclass test ()
((a :documentation "test-a"
:initform (make-array '(3 3)
:element-type 'integer
:initial-element 0)
:initarg :a)))
(defvar *a* (make-instance 'test))
(defmethod not-working ((test test))
(with-slots (a) test
(iter
(for i below 3)
(iter
(for j below 3)
(unless (= 10 (aref a i j))
(log:info "R: ~D C: ~D" i j))))))
(defmethod working ((test test))
(with-slots (a) test
(loop
for i below 3
do (loop
for j below 3
unless (= 10 (aref a i j))
do (log:info "I: ~D J: ~D" i j)))))
(not-working *a*)
(working *a*)
可以正确显示方法名称。此外,省略sbcl
中的ccl
语句会导致工作版本:
(are...)