Skip to content

Commit

Permalink
Resolve stuartsierra#2, Clojurescript support.
Browse files Browse the repository at this point in the history
* bump the Clojure version to greater than 1.7.0 (for cljc)
* add reader conditional to switch on clj / cljs
* bump .gitignore for intellij collaboration
  • Loading branch information
d-t-w committed Feb 6, 2019
1 parent bdc6ba6 commit a6c9ed9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ pom.xml.asc
.lein-repl-history
.nrepl-port
.DS_Store
.idea
*.iml
6 changes: 2 additions & 4 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
:url "https://github.com/stuartsierra/frequencies"
:license {:name "The MIT License"
:url "http://opensource.org/licenses/MIT"}
:profiles {:dev {:dependencies [[org.clojure/clojure "1.5.1"]
[reiddraper/simple-check "0.5.3"]]}
:clj1.4 {:dependencies [[org.clojure/clojure "1.4.0"]
[reiddraper/simple-check "0.5.3"]]}})
:profiles {:dev {:dependencies [[org.clojure/clojure "1.10.0"]
[reiddraper/simple-check "0.5.6"]]}})
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
(let [rank (long (Math/ceil (* k (/ (double sample-count) q))))]
(loop [m (seq sorted-freq-map)
lower 0
prev-value Double/NEGATIVE_INFINITY]
prev-value #?(:clj Double/NEGATIVE_INFINITY
:cljs (.-NEGATIVE_INFINITY js/Number))]
(if-let [entry (first m)]
(let [[value freq] entry
upper (+ lower freq)]
Expand Down

0 comments on commit a6c9ed9

Please sign in to comment.