(defun graph-tree (graph start) (graph-tree-aux graph (list start))) (defun graph-tree-aux (graph path) (let ((children (new-nodes path graph))) (if (null children) (cons (car path) nil) (cons (car path) (mapcar #'(lambda (x) (graph-tree-aux graph (cons x path))) children)))))graph-tree は補助関数graph-tree-auxを使う形にしている.graph-tree-aux は,pathをもらい,そのパスの先端の頂点
> (setq *tree2* (graph-tree *graph1* 's)) (s (d (e (b (a) (c)) (f)) (a (b (e (f)) (c)))) (a (d (e (b (c)) (f))) (b (e (f) (d)) (c))))という具合になる.