Permalink
Browse files

Less-awkward multi-arity handling

  • Loading branch information...
1 parent 28d1bb9 commit 8353156e6e0fb62a5a12056dc854c4450d3c0d3d @amalloy amalloy committed Jul 26, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 modules/xml/src/main/clojure/clojure/data/xml.clj
@@ -240,8 +240,7 @@
protocol to them."
([] nil)
([sexp] (as-elements sexp))
- ([sexp & sexps] (apply concat (as-elements sexp)
- (map as-elements sexps))))
+ ([sexp & sexps] (mapcat as-elements (cons sexp sexps))))
(defn sexp-as-element
"Convert a single sexp into an Element"

0 comments on commit 8353156

Please sign in to comment.