Commit dd8d442f authored by Ricardo J. Mendez's avatar Ricardo J. Mendez

Simplified to-string-set

It's cheaper to call `lower-case` on the string before splitting it,
than lowercase'ing every element after a split.
parent 4eac6eab
......@@ -90,12 +90,11 @@
"Split a string using commas, semi-colons or new lines, trims the resulting
elements, and returns them as a set"
(string/split (or s "") #",|\n|;| ")
(map string/trim)
(remove empty?)
(map string/lower-case)
(into #{})))
(->> (string/split (lower-case (or s ""))
#",|\n|;| ")
(map string/trim)
(remove empty?)
(into #{})))
(defn time-display
"Returns a display string for a number of seconds"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment