We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10dc346 commit 3175e25Copy full SHA for 3175e25
src/refactor_nrepl/ns/clean_ns.clj
@@ -36,13 +36,10 @@
36
(assert-no-exclude-clause (core/get-ns-component ns-form :use))
37
ns-form)
38
39
-(defn- seek
40
- "Find the first element in coll that satisfies pred?"
41
- [pred? coll]
42
- (reduce (fn [_ x] (when (pred? x) (reduced x))) nil coll))
43
-
44
(defn clean-ns [{:keys [path relative-path]}]
45
- (let [path (seek #(and % (.exists (io/file %)))
+ (let [path (some (fn [p]
+ (when (and p (.exists (io/file p)))
+ p))
46
[path relative-path])]
47
(assert (core/source-file? path))
48
;; Prefix notation not supported in cljs.
0 commit comments