Skip to content
Browse files

Add a new rule for plain (apply str ..) and a test.

  • Loading branch information...
1 parent 6addc84 commit 8424bb2b20fd40f61dae27dd2c49c9f487ce3259 @Raynes Raynes committed Jan 25, 2013
Showing with 2 additions and 0 deletions.
  1. +1 −0 src/kibit/rules/misc.clj
  2. +1 −0 test/kibit/test/misc.clj
View
1 src/kibit/rules/misc.clj
@@ -16,6 +16,7 @@
;; clojure.string
[(apply str (interpose ?x ?y)) (clojure.string/join ?x ?y)]
[(apply str (reverse ?x)) (clojure.string/reverse ?x)]
+ [(apply str ?x) (clojure.string/join ?x)]
;; mapcat
[(apply concat (apply map ?x ?y)) (mapcat ?x ?y)]
View
1 test/kibit/test/misc.clj
@@ -6,6 +6,7 @@
(are [expected-alt-form test-form]
(= expected-alt-form (:alt (kibit/check-expr test-form)))
'(clojure.string/join x y) '(apply str (interpose x y))
+ '(clojure.string/join x) '(apply str x)
'(clojure.string/reverse x) '(apply str (reverse x))
'(mapcat x y) '(apply concat (apply map x y))
'(mapcat x y) '(apply concat (map x y))

0 comments on commit 8424bb2

Please sign in to comment.
Something went wrong with that request. Please try again.