       (when loop-locals
         (when (= :return (:context env))
             (emits "return "))
-        (emitln "((func (" (comma-sep (map munge loop-locals)) "){")
+        (emitln "((func (" (comma-sep (map munge loop-locals)) " interface{}){")
         (when-not (= :return (:context env))
             (emits "return ")))
       (if (= 1 (count methods))

              (emit-variadic-fn-method meth)
              (emit-fn-method meth))
            (emitln))
            (emitln mname " = func(" (comma-sep (if variadic
                                                  (concat (butlast maxparams) ['var_args])
                                                  maxparams)) "){")
          (when variadic
            (emits "var ")
            (emit (last maxparams))

  (emit-wrap env
    (emits "(func " (munge name) "(")
    (emit-fn-params params)
    (emits " interface{}){")
    (when type
      (emitln "var self__ = this"))
    (when recurs (emitln "for {"))
