Welcome! Please see the About page for a little more info on how this works.

+1 vote
in Spec by

My understanding is that s/form is expected to return symbolic lists that can be passed to eval. Forms of multi-spec specs don't behave that way, returning retag as evaluated value (e.g. a function instance).

(defn retag [x v]
  (assoc (vec x) 0 v))

(defmulti command first)

(s/form (s/multi-spec command retag))
=> (clojure.spec.alpha/multi-spec 
    #object[current.ns$retag 0x708d0436 current.ns$retag@708d0436])

;; should be something like
=> (clojure.spec.alpha/multi-spec 

Please log in or register to answer this question.