Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #58 from sjl/master

Rule for (= nil x) -> (nil? x)
  • Loading branch information...
commit 453b02afd1cabab552d306b0c308ccb9893ac0e1 2 parents ce4abd2 + 760feec
@jonase authored
Showing with 7 additions and 1 deletion.
  1. +5 −1 src/kibit/rules/equality.clj
  2. +2 −0  test/kibit/test/equality.clj
View
6 src/kibit/rules/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)])
View
2  test/kibit/test/equality.clj
@@ -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)))
Please sign in to comment.
Something went wrong with that request. Please try again.