tbrooke
tbrooke

Reputation: 2197

With-open should be a vector . -- But it is a vector

I am trying to read the input.txt file that is in my resources directory of a leiningen project and I get the "Parameter declaration "with-open" should be a vector" but it looks to me like it is a vector

 (defn read-freq 
   (with-open [rdr (io/resource "input.txt")]
     (doseq [line (line-seq rdr)]
       (println line))))

 Parameter declaration "with-open" should be a vector

What am I doing wrong?

Upvotes: 0

Views: 68

Answers (1)

dpassen
dpassen

Reputation: 1306

Your function lacks a parameter vector.

Line 1 should read:

(defn read-freq []

Upvotes: 4

Related Questions