Browse files

Merge pull request #17 from miner/master

improved doc string for walk
  • Loading branch information...
Raynes committed Dec 28, 2011
2 parents e9d942d + 2de0cf0 commit 145d3ca8cc94f57aeb7f7ab55aa2c406b4b964a2
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/fs/core.clj
@@ -275,12 +275,14 @@
[root dirs files]))
(defn iterate-dir
- "Return a sequence [root dirs files], starting from path"
+ "Return a sequence [root dirs files], starting from 'path' in depth-first order"
(map walk-map-fn (iterate-dir* path)))
(defn walk
- "Walk over directory structure. Calls 'func' with [root dirs files]"
+ "Lazily walk depth-first over the directory structure starting at
+ 'path' calling 'func' with three arguments [root dirs files].
+ Returns a sequence of the results."
[func path]
(map #(apply func %) (iterate-dir path)))

0 comments on commit 145d3ca

Please sign in to comment.