Permalink
Browse files

No point in if-let here (thanks Alan).

  • Loading branch information...
1 parent 1a62c0a commit d8f0921cb0855094937f775c850a3d46c1c3bf79 @Raynes committed May 16, 2011
Showing with 5 additions and 7 deletions.
  1. +5 −7 src/tallyho/core.clj
View
@@ -27,13 +27,11 @@
(JOptionPane/showInputDialog
"Enter -number to decrease score.\nEnter either +number or number to increase score."))]
- (if-let [result (try
- (calculate-score new-score old)
- (catch NumberFormatException e))]
- result
- (do
- (alert "Enter a real number, dude.")
- (recur old)))))
+ (or
+ (try (calculate-score new-score old)
+ (catch NumberFormatException e))
+ (do (alert "Enter a real number, dude.")
+ (recur old)))))
(defn on-table-click
[e]

0 comments on commit d8f0921

Please sign in to comment.