 
 
 (def app-state (atom {:title "Integer composite groups"
-                      :up-to 10}))
+                      :up-to 10
+                      :groups (nums/group-signatures 10)}))
 
 
 (defn title [app]

                (if expanded "EXPANDED" "NOT EXPANDED"))))))


(defn group-view-new
  "Render the contents of one group (set) of numbers."
  [app owner]
  (let [signature [1 1]
        numbers [4 5 6 7 8 9 10 "...dummy data..."]]
    (reify
      om/IInitState
      (init-state [_]
        {:expanded false})
      om/IRenderState
      (render-state [_ {:keys [expanded]}]
        (dom/li nil
                (dom/b nil
                       (str/join ", " signature))
                " [" (nums/vector-magnitude signature) "]"
                (dom/br nil)
                (count numbers) ": " (+ 3 4 )
                (dom/span #js {:onClick (fn [e] (om/set-state! owner :expanded (not expanded)))}
                           (dom/small nil (if expanded
                                            (dom/i nil (str/join ", " numbers))
                                            "CLICK TO EXPAND"))))))))

(defn group-view
  "Render the contents of one group (set) of numbers."
  [[signature numbers] owner]

              " [" (nums/vector-magnitude signature) "]"
              (dom/br nil)
              (count numbers) ": "
              (dom/span #js {:onClick (fn [e] (om/set-state! owner :expanded (not expanded)))}
                        (dom/small nil
                                   (dom/i nil
                                          (if expanded
                                            (str/join ", " numbers)
                                            "{Click to expand}"))))))))


(defn group-view-wrapper
  "Render the contents of one group (set) of numbers."
  [app owner]
  (let [[signature numbers] (first (:groups app))]
    (group-view [signature numbers] owner)))

(defn group-view-wrapper2
  "Render the contents of one group (set) of numbers."
  [app-group owner]
  (let [[signature numbers] (first app-group)]
    (group-view [signature numbers] owner)))

(defn group-view-wrapper3
  "Render the contents of one group (set) of numbers."
  [app-group owner]
  (let [[signature numbers] app-group]
    (group-view [signature numbers] owner)))


(defn groups-view
