                  (str "Typeargs and args must be equal length or typeargs may have "
                       "one more element at the end to represent its return type.")))))
 
-(defmacro separate-types [f args]
+(defmacro separate-types
+  "Given a function signature with type annotations do the following:
+
+  (separate-types ^Int64 do-it [^String a ^Object b c])
+    -> {:typeargs [String Object nil] :typeresult Int64}"
+  [f args]
           `{:typeargs (->> '~args
                            (mapv meta)
                            (mapv :tag))
           :typeresult (:tag (meta '~f))})
 
-;; (defmacro separate-types-oldform [f args]
-;;           `(let [{:keys [typeargs# typeresult#]} (separate-types ~f ~args)]
-;;                 (if typeresult#
-;;                     (conj typeargs# typeresult#)
-;;                   typeargs#)))
-
-(defmacro separate-types-oldform [f args]
+(defmacro separate-types-oldform
+  "Given a function signature with type annotations do the following:
+
+  (separate-types ^Int64 do-it [^String a ^Object b c])
+    -> [String Object nil Int64]
+
+  This is suitable for input into the macro make-delegate."
+  [f args]
           `(let [h# (separate-types ~f ~args)]
                 (if (:typeresult h#)
                     (conj (:typeargs h#) (:typeresult h#))

;; Thanks, Joseph (@selfsame), for the repl environment tip!
(def repl-env (atom (arcadia.repl/env-map)))

(defn repl-eval-print-string [s]
  (let [{:keys [result env]} (arcadia.repl/repl-eval-print repl-env s)]
       (reset! repl-env env)
       result))

                               nil)))
                      (eval `(make-delegate ~typeargs ~args ~f))))))

(defmacro defcmd
    "Define a Minibuffer command and function. The docstring is required.
  The typeargs define what C# types the function accepts and optionally what it
  returns. Minibuffer makes extensive use of the type information. Consider the
