title: Clojure - Convert string into vector of vector of integers
body: <p>I'm trying to parse through a file and use each line to execute any number of functions and parameters. The functions I want to call accept two vectors of vectors of integers for matrix multiplication. I'm able to parse the arguments into one vector so I can call apply on it and the resolved function symbol. But I still need to convert the arguments from strings into the appropriate type. How can I achieve this?</p>
  
  <p>Function header example:</p>
  
  <pre><code>(defn ijk [[&amp; matrixA] [&amp; matrixB]]
     ...
    )
  </code></pre>
  
  <p>Input file example: (splitting string by commas)</p>
  
  <pre><code>ijk,[[1 2] [3 4]],[[1 2] [3 4]]
  kij,[[2 2] [3 4]],[[1 2] [3 4]]
  </code></pre>
  
  <p>How I'm reading the file so far:</p>
  
  <pre><code>(defn get-lines [fname]
    (with-open [r (reader fname)]      
      (loop [file (line-seq r)]
        (if-let [[line &amp; file] file]
          (do (let [[command &amp; args] (str/split line #",")]
                ;apply (resolve (symbol command)) (vec args))    
                )
              (recur file))
          file))))
  </code></pre>
  
  <p>Format of (vec args):</p>
  
  <pre><code>[[[1 2] [3 4]] [[1 2] [3 4]]]
  [[[2 2] [3 4]] [[1 2] [3 4]]]
  </code></pre>
  
  <p>I need to convert each matrix in the args vector into a vector of vectors of integers above. Any and all help is much appreciated by this Clojure noob!</p>