 (defn ^:skip-wiki rep+impl
   "Do not call this directly, use '+'"
   [form p]
-  (pcat* {:ps [p (rep* p p [] true form)] :forms `[~form (* ~form)] :ret []}))
+  (pcat* {:ps [p (rep* p p [] true form)] :forms `[~form (* ~form)] :ret [] :rep+ form}))
 
 (defn ^:skip-wiki amp-impl
   "Do not call this directly, use '&'"

        (if pr
          (pcat* {:ps pr :ks kr :forms fr :ret ret})
          (accept ret)))
      {::op ::pcat, :ps ps, :ret ret, :ks ks, :forms forms})))

(defn- pcat [& ps] (pcat* {:ps ps :ret []}))


            ::alt (alt* (map #(deriv % x) ps) ks forms)
            ::rep (rep* (deriv p1 x) p2 ret splice forms)))))

(defn- op-describe [p]  
  (let [{:keys [::op ps ks forms splice p1 rep+] :as p} (reg-resolve p)]
    ;;(prn {:op op :ks ks :forms forms :p p})
    (when p
      (case op
            ::accept nil
            nil p
            ::amp (list* 'clojure.spec/& (op-describe p1) forms)
            ::pcat (if rep+
                     (list `+ rep+)
                     (cons `cat (mapcat vector ks forms)))
            ::alt (cons `alt (mapcat vector ks forms))
            ::rep (list (if splice `+ `*) forms)))))

