diff options
author | Alex Ott <alexott@gmail.com> | 2010-12-05 18:24:05 +0100 |
---|---|---|
committer | Stuart Halloway <stu@thinkrelevance.com> | 2010-12-19 16:18:26 -0500 |
commit | c5732ac810a2e2806e6309b006566315de36f2c7 (patch) | |
tree | d157bdd4ea099de61dfb38a83838f6568b6520a0 | |
parent | 75fd52a684754fbfb82a167f27e129801530eb19 (diff) |
fix "string.join doesn't work with sets and other collections"
parameters destructuring isn't working with collections that has no operation 'nth'
Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
-rw-r--r-- | src/clj/clojure/string.clj | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/clj/clojure/string.clj b/src/clj/clojure/string.clj index e7500717..a24a7322 100644 --- a/src/clj/clojure/string.clj +++ b/src/clj/clojure/string.clj @@ -133,9 +133,9 @@ Design notes for clojure.string: {:added "1.2"} ([coll] (apply str coll)) - ([separator [x & more]] - (loop [sb (StringBuilder. (str x)) - more more + ([separator coll] + (loop [sb (StringBuilder. (str (first coll))) + more (next coll) sep (str separator)] (if more (recur (-> sb (.append sep) (.append (str (first more)))) |