 (defn fetch-tick
   [old-imgs]
   (let [last-id (-> old-imgs first :id)
-        new-imgs (parse-dates (fetch-images-since last-id))
+        new-imgs (map parse-dates (fetch-images-since last-id))
         all-imgs (concat new-imgs old-imgs)]
     {:all all-imgs, :new new-imgs, :old old-imgs}))
 

  "Read the images cached in the `$images-file`."
  []
  (binding [*read-eval* false]
    (try (-> (slurp $images-file) read-string parse-dates)
      (catch java.io.FileNotFoundException _ ))))

(defn cache-images!
  [imgs]
  (spit $images-file (prn-str (unparse-dates imgs))))

(defn print-summary
  [new-images all-images]

             (let [resort (case time-type
                            :released reverse
                            :taken-marstime identity
                            :taken-utc reverse)]
               [time-type (->> imgs
                            (sort-by time-type)
                            resort
                            (map format-image)
                            doall)]))))

;;
;; Transformations
;;

;;
;; State & Main
