 
 (defmethod emit-seq -invoke-
   [env context gen [fun & args :as call]]
+  (when (nil? fun)
+    (throw (IllegalArgumentException. "Can't invoke nil")))
   (debug "emitting invoke:" call)
   (debug "context:" context)
 

       (list* 'let (map list bind-syms sani-binds) (map (partial sanitize let-env) body)))

     (['define name & val] :seq)
     (let [sani-name (get @global-env name (sanitize-name name))]
       (swap! global-env assoc name sani-name)
       (list* 'define sani-name (map (partial sanitize (assoc env name sani-name)) val)))

     :else
     (map (partial sanitize env) form))


(defn close-name
  [fsym]
  (str "close_" (.replace (munge (name fsym)) "." "_DOT_")))

(defn local-name
  [lsym]
  (str "local_" (.replace (munge (name lsym)) "." "_DOT_")))

(defn handle-name
  [arity restarg]
