 (def app-state (atom 
   {:screen :import
    :txs sample-txs 
+   :register-parts []
    :entry-parts empty-entry-parts}))
 
 (defn store-event [ev]

  (->> txs
       (map :parts)
       (apply concat)
       (group-by :account)
       (map (fn [[account parts]] 
              {:account (account->str account), 
               :amount (fixpt->str (apply + (map :amount parts)))}))
       (sort-by :amount #(compare %2 %1))))

(defn render-menu-link [this-screen title active-screen]
  (if (= this-screen active-screen)

  app-state
  {:target (. js/document (getElementById "accounting"))})

(comment
  [["2015/02/23" "Whole Foods" :e-groceries 25 :l-amex]
   ["2015/02/24" "Trader Joe's" :e-groceries 20 :e-alcohol 10 :l-amex]
   ["2015/02/25" "Ameritrade" :a-ameritrade [100 :GLD] :a-ameritrade -10010]]
)   
    
