Merge pull request #44 from miner/master

prefer (seq x) over (not (empty? x)
This commit is contained in:
Jonas Enlund 2012-07-08 13:15:55 -07:00
commit a34d5c45b1
2 changed files with 4 additions and 0 deletions

View file

@ -6,6 +6,9 @@
[(conj [] . ?x) (vector . ?x)]
[(into [] ?coll) (vec ?coll)]
;; empty?
[(not (empty? ?x)) (seq ?x)]
;; set
[(into #{} ?coll) (set ?coll)])

View file

@ -5,6 +5,7 @@
(deftest collections-are
(are [expected-alt-form test-form]
(= expected-alt-form (:alt (kibit/check-expr test-form)))
'(seq a) '(not (empty? a))
'(vector a) '(conj [] a)
'(vector a b) '(conj [] a b)
'(vec coll) '(into [] coll)