News for hackers. Stuff that matters.
Re:LINQ Ruined My Favorite Interview Question by mrottenkolber on Thursday July 11, 2013 @10:51AM (#6026360)
how does FREQUENCIES know how to compare strings?

In Common Lisp you'd usually supply a TEST keyword parameter (#'STRING= or #'EQUAL in this case). Does Clojure use Java's type system to infer?

Re:LINQ Ruined My Favorite Interview Question by GregWright on Thursday July 11, 2013 @11:19AM (#6026556)
No expert, but from the source it looks like it just uses whatever a 'map' uses to match keys:

  (defn frequencies
    "Returns a map from distinct items in coll to the number of times
    they appear."
    {:added "1.2"
     :static true}
    [coll]
    (persistent!
     (reduce (fn [counts x]
               (assoc! counts x (inc (get counts x 0))))
             (transient {}) coll)))
Re:LINQ Ruined My Favorite Interview Question by nickik on Thursday July 11, 2013 @03:28PM (#6028553)
Clojure uses a unified compare test, sometimes called equiv. I think its passed on this paper, http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.23.9...
Re:LINQ Ruined My Favorite Interview Question by prospero on Thursday July 11, 2013 @12:02PM (#6026895)