> (defn score-by-count ^long [b dir]
> (let [ hm (into [] (core/gather-team b dir))
> aw (into [] (core/gather-team b (unchecked-negate dir)))]
> (unchecked-subtract (count hm)
> (count aw))))
>
(defn counting-accumulator [acc _]
(inc acc))
(defn score-by-count ^long [b dir]
(let [ hm (core/gather-team b dir)
aw (core/gather-team b (unchecked-negate dir))]
(- (r/reduce counting-accumulator 0 hm) (r/reduce
counting-accumulator 0 aw)))
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en