aboutsummaryrefslogtreecommitdiff
path: root/src/clojure/contrib/macros.clj
diff options
context:
space:
mode:
authorKonrad Hinsen <konrad.hinsen@laposte.net>2009-03-02 11:35:07 +0000
committerKonrad Hinsen <konrad.hinsen@laposte.net>2009-03-02 11:35:07 +0000
commitadef4d0980992077b804796f80cceb7b5f9ee780 (patch)
treecdd11986ae3ca4174efd43f869e847cba2d7f2bf /src/clojure/contrib/macros.clj
parente349bec891f980cad20e0fa734045a6bd57820e2 (diff)
General revision of my modules:
- Replaced clojure.contrib.macros/letfn by clojure.core/letfn - Introduced namespaces for all tests and examples - Fixed namespace-related bugs in monads and stream-utils - Introduced :only clause into all :use clauses
Diffstat (limited to 'src/clojure/contrib/macros.clj')
-rw-r--r--src/clojure/contrib/macros.clj11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/clojure/contrib/macros.clj b/src/clojure/contrib/macros.clj
index cf4bc1eb..58236fbf 100644
--- a/src/clojure/contrib/macros.clj
+++ b/src/clojure/contrib/macros.clj
@@ -18,9 +18,14 @@
(eval expr))
;; By Konrad Hinsen
-(defmacro letfn-kh
- "A variant of let for local function definitions. fn-bindings consists
- of name/args/body triples, with (letfn-kh [name args body] ...)
+; This macro is made obsolete by Clojure's built-in letfn. I renamed it to
+; letfn- (to avoid a name clash) but leave it in for a while, since its
+; syntax is not quite the same as Clojure's. Expect this to disappear
+; in the long run!
+(defmacro letfn-
+ "OBSOLETE: use clojure.core/letfn
+ A variant of let for local function definitions. fn-bindings consists
+ of name/args/body triples, with (letfn [name args body] ...)
being equivalent to (let [name (fn name args body)] ...)."
[fn-bindings & exprs]
(let [makefn (fn [[name args body]] (list name (list 'fn name args body)))