 (in-ns 'cljs.core)
 ;;hack on core
 
+
+(deftype Foo [a] IMeta (-meta [_] (fn [] a)))
+((-meta (Foo. 42)))
 
 ;;OLD way, don't you want to use the REPL? 
 (in-ns 'cljs.compiler)

    (when-not (= :expr (:context env)) (print ";\n"))))

(defn emit-fn-method
  [{:keys [name variadic params statements ret env recurs]}]
  (emit-wrap env
             (print (str "(function " name "(" (comma-sep params) "){\n"))
             (when variadic
               (println (str (last params) " = Array.prototype.slice.call(arguments, " (dec (count params)) ");")))
             (when recurs (print "while(true){\n"))

        variadic (some '#{&} params)
        params (remove '#{&} params)
        body (next meth)
        gthis (and fields (gensym "this__"))
        locals (reduce (fn [m fld] (assoc m fld {:name (symbol (str gthis "." (munge fld)))})) locals fields)
        locals (reduce (fn [m name] (assoc m name {:name (munge name)})) locals params)
        recur-frame {:names (vec (map munge params)) :flag (atom nil)}
        block (binding [*recur-frame* recur-frame]
                (analyze-block (assoc env :context :return :locals locals) body))]
    (merge {:env env :variadic variadic :params (map munge params) :gthis gthis :recurs @(:flag recur-frame)} block)))

(defmethod parse 'fn*
  [op env [_ & args] name]
