Permalink
Browse files

Merge pull request #58 from sjl/master

Rule for (= nil x) -> (nil? x)
  • Loading branch information...
jonase committed Nov 9, 2012
2 parents ce4abd2 + 760feec commit 453b02afd1cabab552d306b0c308ccb9893ac0e1
Showing with 7 additions and 1 deletion.
  1. +5 −1 src/kibit/rules/equality.clj
  2. +2 −0 test/kibit/test/equality.clj
@@ -19,5 +19,9 @@
[(= ?x ?x) true]
[(== ?x ?x) true]
- [(zero? 0) true])
+ [(zero? 0) true]
+
+ ; nil?
+ [(= ?x nil) (nil? ?x)]
+ [(= nil ?x) (nil? ?x)])
@@ -14,6 +14,8 @@
'(pos? x) '(> x 0)
'(pos? x) '(<= 1 x)
'(neg? x) '(< x 0)
+ '(nil? x) '(= nil x)
+ '(nil? x) '(= x nil)
true '(= x x)
true '(== x x)
true '(zero? 0)))

0 comments on commit 453b02a

Please sign in to comment.