Permalink
Browse files

Minor refactoring for code readability

  • Loading branch information...
1 parent b4da688 commit cb47b1e5525f16aa37f3fcaa1fdf779486655c38 @swaroopch committed Jul 28, 2013
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/isbnnetinclj2/store.clj
@@ -281,11 +281,12 @@
(let [data (book-data isbn)
price (sort-by val (:price data))
price (map #(apply hash-map
- [:name (string/capitalize (name (first %)))
- :amount (last %)])
+ [:name (string/capitalize (name (key %)))
+ :amount (val %)])
price)
price (map #(if (= Integer/MAX_VALUE (:amount %))
- (merge % {:amount "N/A"}) %)
+ (merge % {:amount "N/A"})
+ %)
price)]
(mus/render-file
"book"

0 comments on commit cb47b1e

Please sign in to comment.