Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit d8f0921cb0855094937f775c850a3d46c1c3bf79 1 parent 1a62c0a
@Raynes authored
Showing with 5 additions and 7 deletions.
  1. +5 −7 src/tallyho/core.clj
View
12 src/tallyho/core.clj
@@ -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]
Please sign in to comment.
Something went wrong with that request. Please try again.