           (= elem-count 0) (throw (IllegalArgumentException. (str "Wrong layout cfg (nothing but flags specified): " v)))))
 
    :else
-   (throw (IllegalArgumentException. (str "Wrong layout cfg: " v)))))
+   (throw (IllegalArgumentException. (str "Wrong layout cfg: '" (if (nil? v) "<nil>" v) "'")))))
 
 (defn cfg->flags [cfg]
   (let [_ (println "------" cfg)]

      nil)))

(fg/defevolverfn :coord-map
 (if-let [layout (map cmd->smile (get-property [:this] :layout))]
   (flagnestedvec->coordmap (map-direction component layout \- \< m/x))))

(fg/defevolverfn :position-matrix
  (if-let [coord-map (get-property [] :coord-map)]


(declare flattenmap)

(defn- node? [e] (and (coll? e) (not (map? e))))

(defn- flatten-mapper [e]
  (if (node? e) (flattenmap e) [e]))

(defn flattenmap [coll]
  (mapcat flatten-mapper coll))
