]> njoseph.me Git - babashka-scripts.git/commitdiff
lib: Use syntactic sugar
authorJoseph Nuthalapati <njoseph@riseup.net>
Sat, 27 Feb 2021 13:15:00 +0000 (18:45 +0530)
committerJoseph Nuthalapati <njoseph@riseup.net>
Sat, 27 Feb 2021 13:15:00 +0000 (18:45 +0530)
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
lib.clj

diff --git a/lib.clj b/lib.clj
index fb67137a1fb0045a221222a63431e74c99c2fe88..16c905981142a16a07ea5ab119ffac68e361b57a 100644 (file)
--- a/lib.clj
+++ b/lib.clj
@@ -41,5 +41,7 @@
     (let [content (if (> (.available System/in) 0)
                     (slurp *in*)
                     (first *command-line-args*))]
     (let [content (if (> (.available System/in) 0)
                     (slurp *in*)
                     (first *command-line-args*))]
-      (doseq [arg (filter #(not= "" %) (split-lines content))]
-        (f arg)))))
+      (->> content
+           (split-lines)
+           (filter seq)
+           (run! f)))))