Maze algorithm from Clojure Programming book