log4cl的奇怪行为并进行迭代

时间:2019-02-23 09:24:43

标签: loops logging common-lisp

我开始使用id,并且在$(function() { $("#includedContent").load("Menu.html", function() { // do stuff $("li", this).removeClass("disabled"); }); }); 循环中使用它时遇到一个奇怪的问题。尽管log4cl确实显示了方法的名称,但iterate却是空的。

我想念这里明显的东西吗?还是workingnot-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...)

0 个答案:

没有答案