letfn

macrosince v0.0-927imported clojure.core/letfnEdit
(letfn fnspecs & body)

Details:

Takes a vector of function definitions fnspecs and binds the functions to their names. All of the names are available in all of the definitions of the functions as well as body.

fnspecs must be a vector with an even number of forms. See let.

letfn is a wrapper over one of ClojureScript's special forms.


See Also:


Source docstring:
fnspec ==> (fname [params*] exprs) or (fname ([params*] exprs)+)

Takes a vector of function specs and a body, and generates a set of
bindings of functions to their names. All of the names are available
in all of the definitions of the functions, as well as the body.
Source code @ clojure:src/clj/clojure/core.clj
(defmacro letfn 
  {:added "1.0", :forms '[(letfn [fnspecs*] exprs*)],
   :special-form true, :url nil}
  [fnspecs & body] 
  `(letfn* ~(vec (interleave (map first fnspecs) 
                             (map #(cons `fn %) fnspecs)))
           ~@body))