I tried to write a function to process a line of string by calling str\split, the function works fine if i call it directly in LEIN REPL window, but will hit the above call error while trying to run the program from LEIN RUN. Any suggestion?
(let [num-letters (count (apply str line))
num-spaces-needed (- column-length num-letters)
num-words (count (clojure.string/split line #"\s"))
num-space-in-group (if (= 1 num-words) num-spaces-needed (/ num-spaces-needed (- num-words 1)))
group-of-spaces (repeat num-space-in-group " ")
padding (create-list-spaces num-spaces-needed (dec (count line)))]
( clojure.string/join "" (if (empty? padding) (cons line group-of-spaces)
(cons (first line) (interleave (rest line) padding)))))