    (fn [_ incoming]
      (let [res (vals (peek incoming))]
        (delay
-        (when (and (seq res) (every? #(not= #{nil} %) res))
+        (when (and (== (count res) 3) (every? #(not= #{nil} %) res))
           (->> res
                (map #(disj % nil))
                (set)


(defn signal-select
  [vertex [idx sel]]
  [idx (if sel (@vertex sel [nil]) (->> @vertex vals (eduction (mapcat identity))))])

(def collect-select
  (f/simple-collect

          q   (add-query _ qid query)
          inf (f/add-vertex! g {:val #{} ::f/collect-fn (collect-inference _ production)})]
      (f/add-edge! g (:result q) inf f/signal-forward nil)
      {:query q :inf inf}))
  )

(defn triple-graph
