From ebc79c278b49c4956ea710b540d659b2fc72eecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Mon, 31 May 2021 13:15:42 +0200 Subject: [PATCH] :recycle: Apply transducer-fu --- common/src/app/common/pages/helpers.cljc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/src/app/common/pages/helpers.cljc b/common/src/app/common/pages/helpers.cljc index 9ad6aa04e..7ab687dca 100644 --- a/common/src/app/common/pages/helpers.cljc +++ b/common/src/app/common/pages/helpers.cljc @@ -410,10 +410,10 @@ "Decompose a string in the form 'one / two / three' into a vector of strings, normalizing spaces." [path] - (->> (str/split path "/") - (map str/trim) - (remove str/empty?) - vec)) + (let [xf (comp (map str/trim) + (remove str/empty?))] + (->> (str/split path "/") + (into [] xf)))) (defn join-path "Regenerate a path as a string, from a vector."