if-let -> when-let

This commit is contained in:
Jonas Enlund 2012-03-10 06:59:47 +02:00
parent 63f65bd029
commit 9c2318dde5

View file

@ -77,9 +77,8 @@
"Given a full expression/form-of-forms/form, return a map containing the
alternative suggestion info, or `nil` (see: `check-form`)"
[expr]
(if-let [new-expr (walk/walk #(or (-> % check-form :alt) %) check-form expr)]
(assoc new-expr :expr expr)
nil))
(when-let [new-expr (walk/walk #(or (-> % check-form :alt) %) check-form expr)]
(assoc new-expr :expr expr)))
;; Reading source files
;; --------------------