Skip to content
Browse files

Merge pull request #17 from miner/master

improved doc string for walk
  • Loading branch information...
2 parents e9d942d + 2de0cf0 commit 145d3ca8cc94f57aeb7f7ab55aa2c406b4b964a2 @Raynes Raynes committed
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/fs/core.clj
View
6 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"
[path]
(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.
Something went wrong with that request. Please try again.