                    (map cross_empty* safeGs)))))
         (commit (first solutions) "solution")))))
 
-)+)
+
+
+(rule 'hello
+      :create (pattern
+               (node :label "Hello")))
+
+(rule 'world
+      :read 	(pattern
+              (node 'h :label "Hello"))
+      :create	(pattern
+               (node 'w :label "World")
+               (edge :src 'h :tar 'w :label "to")))
+
+(rule 'vine
+      :read 	(pattern
+              (node 'h :label "Hello")
+              (node 'w :label "World")
+              (edge 'e :src 'h :tar 'w :label "to"))
+      :delete ['w 'e]
+      :create	(pattern
+               (node 'g :label "Grape")
+               (edge :src 'h :tar 'g :label "to")))
  "DSL form to create a new graph"
  (let [g (->
         (dbquery (str "create (g:`__Graph` {uid: apoc.create.uuid()}) return g"))
         first second first first :data :uid)]
    (set-graph! g)
    g))


  "return the occurance of kind nodes for graph g"
  (let [qstr (str "match(g:`__Graph` {uid:'" g "'}) -[:" kind "]->(n:`__Node`) RETURN n  ")]
    (->>
     (dbquery qstr)
     (map #(-> % (get-in ["n"]) (select-keys [:metadata :data]))))))

(defn occdelnodes [g]
