           ::pcat (add-ret p0 ret k)
           ::alt (let [[[p0] [k0]] (filter-alt ps ks forms accept-nil?)
                       r (if (nil? p0) ::nil (preturn p0))]
-                  (if k0 [k0 r] r)))))
+                  (if k0 (tagged-ret k0 r) r)))))
 
 (defn- op-unform [p x]
   ;;(prn {:p p :x x})


  (s/or :even even? :small #(< % 42))

  Returns a destructuring spec that
  returns a vector containing the key of the first matching pred and the
  corresponding value."
  [& key-pred-forms]
  (let [pairs (partition 2 key-pred-forms)
        keys (mapv first pairs)

      (with-gen* [_ gfn] (tuple-impl forms preds gfn))
      (describe* [_] `(tuple ~@forms)))))

(defn- tagged-ret [tag ret]
  (clojure.lang.MapEntry. tag ret))

(defn ^:skip-wiki or-spec-impl
  "Do not call this directly, use 'or'"
