LISPUSERLISPMEMOLisp isn't a language, it's a building material. -- Alan Kay 先日 ANSI Common Lisp の bfs がわかりにくい、という話があったので。 A -> B, C B -> C C -> D で、このようなネットワークの A から C までの最短経路を求める。 (defun shortest-path (start end net) (bfs end (list (list start)) net)) (defun bfs (end queue net) (if (null queue) nil (let ((path (car queue))) (let ((node (car path))) (if (eql node end) (reverse path) (bfs end (app