News for hackers. Stuff that matters.
Re:Pending Comments by jw2013 on Saturday March 22, 2014 @02:25AM (#7448003)
>>It may be that bad comments tend to be concentrated on particular threads, and that the right way to implement pending comments is per-thread rather than site-wide.

So what about this? Here comments is a vector of all the scores of comments inside one particular thread.

----

(defn filter? [comments threshold]

  (let [size (count comments)]

    (if (< threshold (/ (reduce + comments) size)) false

       true)))
;;user=> (filter? [1 2 3 4] 2)

;;false

;;user=> (filter? [1 2 3 4] 3)

;;true

There are no comments on this comment yet.