                   (apply concat)
                   (map (partial into {}))
                   (map (fn [node-map]
-                         (select-keys node-map [:selection :node-type :parent-type :child-type]))))
+                         (->> [:selection :parent-type :node-type :child-type]
+                              (select-keys node-map)))))
           ))
-   (map prn)
+  )
+  )
+
+(defn summarize-all-parens
+  [edn-file csv-file]
+  (->>
+   edn-file
+   read-lines
+   ;(take 10)
+   flatten-all-parens
+   frequencies
+   (map (partial-right update-in [0] (partial map-values #(some-> % name))))
+   (map (fn [[m count]] (assoc m :count count)))
+   ;(map prn)
+   (maps-to-csv csv-file)
    time-mins
    )
   )
-
-   (select-keys {:a 1 :b 2} [:a :b])
 
 (defn main-superfluous-parens
   []

  (let [paren-types
        [(Atom. :parens paren-node? (default-finder paren-node?))
         (Atom. :superfluous-parens superfluous-parens?
                (default-finder #(when (paren-node? %) (superfluous-parens? %))))
         (atom-lookup :operator-precedence)]]
  (find-atoms paren-types root)))


        csv-file "src/analysis/data/all-parens_2018-10-29_02_child.csv"
        ]
    ;(find-all-parens-in-project edn-file)
    (summarize-all-parens edn-file csv-file)
  ))
