diff options
author | Rich Hickey <richhickey@gmail.com> | 2009-04-27 17:37:21 +0000 |
---|---|---|
committer | Rich Hickey <richhickey@gmail.com> | 2009-04-27 17:37:21 +0000 |
commit | e9212ed36488b6fab3809082e8771c19be81da84 (patch) | |
tree | 35f8ea75b0b763ce3b31eebcc22f6cde2d7a67f8 /src/clj | |
parent | be925c49b9d7c9e799711fd4caa4cf248ac16023 (diff) |
got rid of assert-if-lazy-seq, if*, and if as macro
Diffstat (limited to 'src/clj')
-rw-r--r-- | src/clj/clojure/core.clj | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/clj/clojure/core.clj b/src/clj/clojure/core.clj index 25cb5d18..2f126fb8 100644 --- a/src/clj/clojure/core.clj +++ b/src/clj/clojure/core.clj @@ -38,10 +38,6 @@ fn (fn* fn [& decl] (cons 'fn* decl))) (def - #^{:macro true} - if (fn* if [& decl] (cons 'if* decl))) - -(def #^{:arglists '([coll]) :doc "Returns the first item in the collection. Calls seq on its argument. If coll is nil, returns nil."} @@ -294,20 +290,6 @@ (. (var defmacro) (setMacro)) -(defmacro assert-if-lazy-seq? {:private true} [] - (let [prop (System/getProperty "clojure.assert-if-lazy-seq")] - (if prop - (if (clojure.lang.Util/equals prop "") nil true)))) - -(defmacro if [tst & etc] - (if* (assert-if-lazy-seq?) - (let [tstsym 'G__0_0] - (list 'clojure.core/let [tstsym tst] - (list 'if* (list 'clojure.core/instance? clojure.lang.LazySeq tstsym) - (list 'throw (list 'new Exception "LazySeq used in 'if'")) - (cons 'if* (cons tstsym etc))))) - (cons 'if* (cons tst etc)))) - (defmacro when "Evaluates test. If logical true, evaluates body in an implicit do." [test & body] |