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
> 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
>>
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"},
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,
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
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