     {} triples))
 
 
+;;;;
+;;; The following index implementation creates a set for the innermost
+;;; index rather than a map.  It is included for reference and is not
+;;; currently in use. 
+;;;;
+
+;; (defn make-index [triples key1 key2 key3]
+;;   (reduce (fn [i0 triple]
+;;             (let [i1 (or (i0 (key1 triple)) {})
+;;                   i2 (or (i1 (key2 triple)) #{})]
+;;               (assoc i0
+;;                 (key1 triple)
+;;                 (assoc i1
+;;                   (key2 triple)
+;;                   (conj i2 (key3 triple))))))
+;;     {} triples))
+
+
 (defn add-index [g key1 key2 key3]
   (->Graph (id g)
     (assoc (indices g)

  (.write w (str (count (triples g))))
  (.write w " triples)>"))


;; (defn make-index [triples key1 key2 key3]
;;   (reduce (fn [i0 triple]
;;             (let [i1 (or (i0 (key1 triple)) {})
;;                   i2 (or (i1 (key2 triple)) #{})]
;;               (assoc i0
;;                 (key1 triple)
;;                 (assoc i1
;;                   (key2 triple)
;;                   (conj i2 (key3 triple))))))
;;     {} triples))

(defn make-index [triples key1 key2 key3]
  (reduce (fn [i0 triple]

;;  => #<Graph 6d863860-723d-1195-8101-7831c1bbb832 (1 triples)>
;;  => #<Graph 6d863860-723d-1195-8101-7831c1bbb832 (1 triples)>


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Indexed Graph Query
;;
;; Implememnted as a multifunction rather than protocol to allow modular
;; separation of implmentation based on supplied constituents of query.
