Simplify load-plugins with enumeration-seq

This commit is contained in:
Jan Stępień 2015-09-20 22:52:51 +02:00
parent 9500f2185d
commit c557fa8478

View file

@ -12,7 +12,5 @@
(defn load-plugins [] (defn load-plugins []
(let [plugins (.getResources (ClassLoader/getSystemClassLoader) "plugin.edn")] (let [plugins (.getResources (ClassLoader/getSystemClassLoader) "plugin.edn")]
(loop [] (doseq [plugin (enumeration-seq plugins)]
(load-plugin (. ^java.net.URL (. plugins nextElement) openStream)) (load-plugin (. ^java.net.URL plugin openStream)))))
(when (.hasMoreElements plugins)
(recur)))))