Skip to content

Instantly share code, notes, and snippets.

@nyuichi
Created October 26, 2012 03:51
Show Gist options
  • Select an option

  • Save nyuichi/3956761 to your computer and use it in GitHub Desktop.

Select an option

Save nyuichi/3956761 to your computer and use it in GitHub Desktop.
(defparameter list nil)
(defparameter set nil)
(defun visit (node)
(unless (visitedp node)
(mark-visited node)
(loop for m in (connected-nodes node) do
(visit m))
(push node)))
(loop for n in set do
(visit n))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment