Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Minor refactoring for code readability

  • Loading branch information...
commit cb47b1e5525f16aa37f3fcaa1fdf779486655c38 1 parent b4da688
@swaroopch authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/isbnnetinclj2/store.clj
View
7 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"
Please sign in to comment.
Something went wrong with that request. Please try again.