 (defn fixpt->str [n]
   (.toFixed (/ n 100) 2))
   
-(defn account->vec [account]
+(defn account-key->vec [account]
   (str/split (subs (str account) 1) "-"))
 
-(defn account->str [account]
-  (str/join "." (map ucfirst (account->vec account))))
+(defn account-vec->str [account]
+  (str/join "." (map ucfirst account)))
+
+(def account-key->str (comp account-vec->str account-key->vec))
 
 (defn str->account [account]
   (keyword (str/join "-" (map #(.toLowerCase %) (str/split account ".")))))

          (dom/tr nil
            (dom/td nil date)
            (dom/td nil description)
            (dom/td nil (account->str to-account))
            (dom/td nil (if to-account "←"))
            (dom/td nil amount)
            (dom/td nil (if from-account "←"))
            (dom/td nil (account->str from-account))
            (dom/td nil note)))))))

(defn render-screen [{:keys [screen txs] :as state}]

      " \u00A0 "
      (render-menu-link :summary "Summary" screen)
      " \u00A0 "
      (render-menu-link :detail "Detail" screen)
      " \u00A0 "
      (render-menu-link :register "Register" screen))
    (case screen
      :import (render-import state)
      :summary (render-summary (summarize txs))
      :detail (render-detail state)
      :register (render-register state))))

(defn dom-el [id]
  (.getElementById js/document id))
