               {:book-id (:id b)
                :book-num (:num b)
                :chap-cnt (count (:chapters b))}))
-          (:chapters b))))))
+          (:chapters b))))
+    (vec)))
 
 (def ^:private beginbracket [:beginbracket "["])
 (def ^:private endbracket [:endbracket "]"])

        [:title "The King James Bible"]
        [:link {:rel "stylesheet" :type "text/css" :href "styles.css"}]]
      [:body
        [:h1 "The King James Bible"]

        [:h2 "The Old Testament"]
        (->> m
          (take 39)
          (map toc-book))

        [:h2 "The New Testament"]
        (->> m
          (drop 39)
          (map toc-book))]]))

(defn chapters [m]
  (->> m

    (.writeFileSync node-fs filepath buff)))

(defn prepare! [parser src output-dir]
  (let [m (parse parser src)
        all-chapters (chapters m)]
    (write! output-dir "styles.css" (style))
    (write! output-dir "7ce12f75-f371-4e85-a3e9-b7749a65f140.html" (toc m))
    (dorun
      (map-indexed
        #(write!
          output-dir
          (rel-url %2)
          (chapter %2
            (prev-chapter all-chapters %1)
            (next-chapter all-chapters %1)))
        all-chapters))))