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

This commit is contained in:
Anthony Grimes 2013-01-25 15:27:43 -06:00
parent 6addc843e0
commit 8424bb2b20
2 changed files with 2 additions and 0 deletions

View file

@ -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 file

@ -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))