Using clojure, how do you read a file of strings and store it in an int-array or vector.
Here are my functions so far.
(:require [clojure.java.io :as io])
(defn getData [filename]
(doseq [line
(with-open [rdr (io/reader filename)]
(doall (line-seq rdr)))]
(println line)))
(defn convert [string]
(map #(Integer/parseInt %)
(.split #" " string)))
I am not sure where to go from here. I have tried to call the getData function inside the convert function but have had no luck because the getData function is not returning the string.
-> (apply convert (getData "num.txt"))