Permalink
Browse files

Remove do binding in let form

do binding in let form is not neccessary as let provides an implicit do
form.
  • Loading branch information...
1 parent b085c01 commit 24ff7fd6ea75c97ea8476f82fba3c6345a941b27 @ljos ljos committed Sep 20, 2012
Showing with 3 additions and 2 deletions.
  1. +1 −1 src/kibit/rules/control_structures.clj
  2. +2 −1 test/kibit/test/control_structures.clj
View
2 src/kibit/rules/control_structures.clj
@@ -18,7 +18,7 @@
;; suggest `while` for bindingless loop-recur
[(loop [] (when ?test . ?exprs (recur)))
(while ?test . ?exprs)]
- )
+ [(let ?binding (do . ?exprs)) (let ?binding . ?exprs)])
(comment
(when (not (pred? x y)) (f x y))
View
3 test/kibit/test/control_structures.clj
@@ -16,4 +16,5 @@
'single-expression '(do single-expression)
'_ '(when-not true anything)
'_ '(when false anything)
- '(when-let [a test] expr) '(if-let [a test] expr nil)))
+ '(when-let [a test] expr) '(if-let [a test] expr nil)
+ '(let [a 1] (println a) a) '(let [a 1] (do (println a) a))))

0 comments on commit 24ff7fd

Please sign in to comment.