summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2007-12-11 19:32:05 +0000
committerRich Hickey <richhickey@gmail.com>2007-12-11 19:32:05 +0000
commitbb0c28d8a30c12ba0aedab6f902ef869b957fba8 (patch)
treeab3cfcdc6151a18de1c8f06d90a47438ef6c9e91 /src
parentb41c0d9f7eefbe8541adf68e43f2fcd365466812 (diff)
made apply work with any collection as last arg
Diffstat (limited to 'src')
-rw-r--r--src/boot.clj8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/boot.clj b/src/boot.clj
index 5fb66883..8ca20f42 100644
--- a/src/boot.clj
+++ b/src/boot.clj
@@ -99,10 +99,13 @@
(second clauses)
(cons 'cond (rest (rest clauses))))))
+(defn seq [coll]
+ (. clojure.lang.RT (seq coll)))
+
(defn spread [arglist]
(cond
(nil? arglist) nil
- (nil? (rest arglist)) (first arglist)
+ (nil? (rest arglist)) (seq (first arglist))
:else (cons (first arglist) (thisfn (rest arglist)))))
(defn apply [#^clojure.lang.IFn f & args]
@@ -120,8 +123,7 @@
(defmacro lazy-cons [x & body]
(list 'fnseq x (list* 'fn [] body)))
-(defn seq [coll]
- (. clojure.lang.RT (seq coll)))
+
(defn concat
([] nil)