Function: TREE-SEARCH

Source

(defun tree-search (states goal-p successors combiner)
  (cond ((null states) nil)
	((funcall goal-p (first states)) (first states))
	(t (tree-search
	    (funcall combiner
		     (funcall successors (first states))
		     (rest states))
	    goal-p successors combiner))))
Source Context