 (defn functiondef-fn [& args]
   (let [fn-args (vec (first (second args)))
         fn-body (second (second args))]
-  `(fn ~fn-args ~fn-body)))
+    `(fn ~fn-args ~fn-body)))
 
 (defn tableconstructor-fn [& args]
   (println "table:" args)

    ))

(defn prefixexp-fn [& args]
  (first args))

(defn varlist-fn [& args]
  (cons :varlist (leave :even args))


(comment

(proteus/let-mutable
    (retval
      nil
      some_fn ^:local (clojure.core/fn
                [arg1 arg2]
                (set! retval 3 #_(+ retval 4))
                retval)
      _
      (some_fn 3 5)))



  
  (try (proteus/let-mutable
    (retval
      0
      some_fn (clojure.core/fn
                [arg1 arg2]
                (let-mutable []
                  (set! retval 3 #_(+ retval 4))
                  retval))
      _
      (some_fn 3 5)))
      (catch Exception ex (clojure.stacktrace/print-stack-trace ex)))


(let* 
  [retval (new proteus.Containers$O nil) 
   some_fn (new proteus.Containers$O nil) 
   _ (new proteus.Containers$O 
          (do 
            (do 
              (. retval set 0) nil)
            (do (. some_fn set 
                   (let* [retval (. retval x) some_fn (. some_fn x)] 
                     (fn* ([arg1 arg2] 
                           (let* [] 
                             (set! retval (+ retval 4)) 
                             retval))))) 
                nil) 
            ((. some_fn x) 3 5)))])
(let* 
  [retval (new proteus.Containers$O nil) 
   some_fn (new proteus.Containers$O nil) 
   _ (new proteus.Containers$O 
          (do 
            (do 
              (. retval set 0) nil) 
            (do (. some_fn set 
                   (fn* ([arg1 arg2] 
                         (let* [] 
                           (do (. retval set (. clojure.lang.Numbers (add (. retval x) 4))) nil) (. retval x))))) nil) ((. some_fn x) 3 5)))])
  (proteus/let-mutable
      (retval
        nil
        some_fn
        nil
        _
        (do
          (set! retval 0)
          (set!
              some_fn
              ^:local (clojure.core/fn
                [arg1 arg2]
                (let-mutable []
                  (set! retval (+ retval 4))
                  retval)))
          ^:stat (some_fn 3 5))))

(try (anonymous-chunk)
      (catch Exception ex (clojure.stacktrace/print-stack-trace ex)))
