Changes for clojure.core/group-by

uvtc on Sat, 08 Sep 2012
;; group by a primary key
user=> (group-by :user-id [{:user-id 1 :uri "/"} 
                           {:user-id 2 :uri "/foo"} 
                           {:user-id 1 :uri "/account"}])

{1 [{:user-id 1, :uri "/"} {:user-id 1, :uri "/account"}],
 2 [{:user-id 2, :uri "/foo"}]}
zkim on Sun, 26 Sep 2010
;; group by a primary key
user=> (group-by :user_id [{:user_id 1 :uri "/"} 
                           {:user_id 2 :uri "/foo"} 
                           {:user_id 1 :uri "/account"}])

{1 [{:user_id 1, :uri "/"} {:user_id 1, :uri "/account"}], 2 [{:user_id 2, :uri "/foo"}]}
Brool on Tue, 21 Sep 2010
; group by a primary key
(group-by :user_id [ { :user_id 1 :uri "/" } { :user_id 2 :uri "/foo"} { :user_id 1 :uri "/account"} ])
; {1 [{:user_id 1, :uri "/"} {:user_id 1, :uri "/account"}], 2 [{:user_id 2, :uri "/foo"}]}