boundpはローカル変数を認識しない
http://ja.doukaku.org/35/をCommon Lispで解こうとしたんだが、うまくいかん。
HyperSpecに書いてあったけど、letによるローカル変数はboundpで認識しない。
Examples: (setq x 1) => 1 (boundp 'x) => true (makunbound 'x) => X (boundp 'x) => false (let ((x 2)) (boundp 'x)) => false (let ((x 2)) (declare (special x)) (boundp 'x)) => true
do-symbolsも検出してくれんようだ。
Examples: (make-package 'temp :use nil) => #<PACKAGE "TEMP"> (intern "SHY" 'temp) => TEMP::SHY, NIL ;SHY will be an internal symbol ;in the package TEMP (export (intern "BOLD" 'temp) 'temp) => T ;BOLD will be external (let ((lst ())) (do-symbols (s (find-package 'temp)) (push s lst)) lst) => (TEMP::SHY TEMP:BOLD) OR=> (TEMP:BOLD TEMP::SHY) (let ((lst ())) (do-external-symbols (s (find-package 'temp) lst) (push s lst)) lst) => (TEMP:BOLD) (let ((lst ())) (do-all-symbols (s lst) (when (eq (find-package 'temp) (symbol-package s)) (push s lst))) lst) => (TEMP::SHY TEMP:BOLD) OR=> (TEMP:BOLD TEMP::SHY)
ってことはCommon Lisp標準の範囲では無理なのかな?