Re: results from sort-by are not sorted

2019-05-05 Thread sheng . peisi . luo
Thanks. What a newbie question. 在 2019年5月6日星期一 UTC+8上午11:34:36,se...@corfield.org写道: > > (sort-by #{:age} …) will use the set #{:age} as the keyfn, and both > (#{:age} {:age 3, :name “luo”}) and (#{:age} {:age 1, :name “sheng”}) both > return :age – because both maps contain the key in the set.

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