RE: results from sort-by are not sorted

2019-05-07 Thread Sean Corfield
omebody, you're not really alive." -- Margaret Atwood From: clojure@googlegroups.com on behalf of Justin Smith Sent: Monday, May 6, 2019 1:53:48 PM To: Clojure Subject: Re: results from sort-by are not sorted minor nitpick to the answer Sean provid

Re: results from sort-by are not sorted

2019-05-06 Thread Justin Smith
> appropriately. >> >> >> >> Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN >> An Architect's View -- http://corfield.org/ >> >> "If you're not annoying somebody, you're not really alive." >> -- Margaret Atwood >>

Re: results from sort-by are not sorted

2019-05-05 Thread sheng . peisi . luo
t; > > *From: *sheng@gmail.com > *Sent: *Sunday, May 5, 2019 7:48 PM > *To: *Clojure > *Subject: *results from sort-by are not sorted > > > > Hey there, > > > > in my lein repl, > > > > (sort-by #{:age} [{:age 3,:name "luo"},

RE: results from sort-by are not sorted

2019-05-05 Thread sean
you're not annoying somebody, you're not really alive."-- Margaret Atwood From: sheng.peisi@gmail.comSent: Sunday, May 5, 2019 7:48 PMTo: ClojureSubject: results from sort-by are not sorted Hey there,  in my lein repl,  (sort-by #{:age} [{:age 3,:name "luo"},{:age 1,

Re: results from sort-by are not sorted

2019-05-05 Thread Bill Xie
clojure.core/sort-by ([keyfn coll] [keyfn comp coll]) Returns a sorted sequence of the items in coll, where the sort order is determined by comparing (keyfn item). If no comparator is supplied, uses compare. comparator must implement java.util.Comparator. Guaranteed to be stable: equal e

results from sort-by are not sorted

2019-05-05 Thread sheng . peisi . luo
Hey there, in my lein repl, (sort-by #{:age} [{:age 3,:name "luo"},{:age 1,:name "sheng"}]) returns ({:age 3, :name "luo"} {:age 1, :name "sheng"}) rather than ({:age 1, :name "sheng"}, {:age 3, :name "luo"}). Why? -- You received this message because you are subscribed to the Googl