(parse-example args)

Source

(defn parse-example [args] (let [{:keys [meta body]} (s/conform ::args args) _ (when (= meta :clojure.spec/invalid) (throw (Exception. (str "Invalid args: " (pr-str args))))) [meta-type meta-val] meta opts (case meta-type :doc {:doc meta-val} :opts meta-val {}) body (if (> (count body) 1) (apply list 'do body) (first body))] (assoc opts :body body)))