title: A Vampire Data Analysis Program for the FWPD, Clojure for the Brave and True
body: <p>I am trying to understand the program "A Vampire Data Analysis Program for the FWPD" at the end of the 4th chapter in the book "Clojure for the Brave and True". Here is the code:</p>
  
  <pre><code>(ns fwpd.core)
  
  (def filename "suspects.csv")
  
  (def vamp-keys [:name :glitter-index])
  
  (defn str-&gt;int
    [str]
    (Integer. str))
  
  (def conversions {:name identity
                :glitter-index str-&gt;int})
  
  (defn convert
     [vamp-key value]
    ((get conversions vamp-key) value))
  
  (defn parse
    "Convert a CSV into rows of columns"
    [string]
    (map #(clojure.string/split % #",")
     (clojure.string/split string #"\n")))
  
  (defn mapify
    "Return a seq of maps like {:name \"Edward Cullen\" :glitter-index 10}"
    [rows]
   (map (fn [unmapped-row]
       (reduce (fn [row-map [vamp-key value]]
                 (assoc row-map vamp-key (convert vamp-key value)))
               {}
               (map vector vamp-keys unmapped-row)))
     rows))
  
  (defn glitter-filter
    [minimum-glitter records]
    (filter #(&gt;= (:glitter-index %) minimum-glitter) records))
  </code></pre>
  
  <p>Can somebody help about conversions and convert function? </p>