     (. gen invokeVirtual (asmtype StringBuilder) (Method/getMethod "StringBuilder append(String)"))
     (. gen loadArg 0)
     (. gen invokeVirtual (asmtype StringBuilder) (Method/getMethod "StringBuilder append(int)"))
-    (. gen push (str " for " (count arity) ")"))
+    (. gen push (str " for " arity ")"))
     (. gen invokeVirtual (asmtype StringBuilder) (Method/getMethod "StringBuilder append(String)"))
     (. gen invokeVirtual (asmtype StringBuilder) (Method/getMethod "String toString()"))
     (. gen invokeConstructor (asmtype IllegalArgumentException) (Method/getMethod "void <init>(String)"))

   (match (seq form)
     nil form
     
     (['quote val] :seq) val

     (['lambda params & body] :seq)
     (let [lambda-env (extend-env env params)]

    (. gen returnValue)
    (. gen endMethod)))

(def ^:dynamic *compiled-lambdas*)
(defn compile
  "Compiles a given sanitized lambda form. If the input is not already
  sanitized, the results are undefined!

  Returns a vector of [<class name>, <closed-overs>, <bytecode>]"
  [[_ params & body :as lambda]]
  (when-not (get @*compiled-lambdas* lambda)
    (println "Compiling:" lambda)
    (let [fv (vec (free-vars lambda))
          cw (ClassWriter. ClassWriter/COMPUTE_FRAMES)
          lname (str "lambda_" (next-id))
          fqname (str "cljstatic/scheme2/" lname)
          _ (println "fqname:" fqname)
          dotname (.replace fqname "/" ".")
          ifaces (into-array String ["cljstatic/ILambda"])
          env {:params params, :closed-overs fv, :locals {} :thistype (Type/getObjectType fqname)}]
      (. cw visit Opcodes/V1_7 Opcodes/ACC_PUBLIC fqname nil "java/lang/Object" ifaces)
      (gen-closure-fields cw fv)
      (gen-ctor cw fqname fv)
      (gen-body cw env body)
      (gen-handle cw fqname (count params))
      (swap! *compiled-lambdas* conj lambda)
      [dotname fv (.toByteArray cw)])))

(defn emit
  [env context gen form]
