Skip to content

Commit

Permalink
test for long instead of catching error
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed Jan 11, 2015
1 parent 1308373 commit 93bf0ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/exemplar.clj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ marshal them to files for edn, json, json-verbose, and msgpack."
(defn range-centered-on
([n] (range-centered-on n 5))
([n m] (mapv
#(try (long %) (catch Exception e %))
#(if (<= % Long/MAX_VALUE) (long %) %)
(range (- n m) (+ n m 1)))))

(defn vector-of-keywords
Expand Down

0 comments on commit 93bf0ce

Please sign in to comment.