gen-apply-to

macrosince v0.0-1211Edit
(gen-apply-to)

Source code @ clojurescript:src/main/clojure/cljs/core.cljc
(core/defmacro gen-apply-to []
  `(do
     (set! ~'*unchecked-if* true)
     (defn ~'apply-to [~'f ~'argc ~'args]
       (let [~'args (seq ~'args)]
         (if (zero? ~'argc)
           (~'f)
           ~(gen-apply-to-helper))))
     (set! ~'*unchecked-if* false)))