Permalink
Browse files

Take kibit advice

  • Loading branch information...
apage43 committed Nov 12, 2012
1 parent b2773fc commit e325b389735ff9ca4117d5f22e8ce8d68dfe7bf1
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/marky/app.clj
  2. +2 −2 src/marky/generate.clj
View
@@ -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
@@ -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)

0 comments on commit e325b38

Please sign in to comment.