Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Take kibit advice

  • Loading branch information...
commit e325b389735ff9ca4117d5f22e8ce8d68dfe7bf1 1 parent b2773fc
@apage43 apage43 authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  src/marky/app.clj
  2. +2 −2 src/marky/generate.clj
View
2  src/marky/app.clj
@@ -48,7 +48,7 @@
(defn fetch-twitter [user]
(let [sourceid (str "twitter=" user)
tweets (:body (http/get twitter-status-url {:as :json :query-params {:screen_name user}}))
- not-replies (filter #(not (:in_reply_to_screen_name %)) tweets)]
+ not-replies (remove :in_reply_to_screen_name tweets)]
(for [tweet not-replies]
{:source-id sourceid
:item-id (str sourceid ",id=" (:id_str tweet))
View
4 src/marky/generate.clj
@@ -3,8 +3,8 @@
[cbdrawer.client :as cb]))
(defn pick [wset]
- (when-not (empty? wset)
- (let [tot (reduce + (map :value wset))]
+ (when (seq wset)
+ (let [tot (apply + (map :value wset))]
(loop [i (rand tot)
[{weight :value :as item} & more] (seq wset)]
(if (>= weight i)
Please sign in to comment.
Something went wrong with that request. Please try again.