Permalink
Browse files

Add a rule for (= nil x) -> (nil? x)

  • Loading branch information...
sjl committed Nov 9, 2012
1 parent c450d1d commit 760feec11a784c4dcc1de20c4a175a750a962122
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 760feec

Please sign in to comment.