News for hackers. Stuff that matters.
Re:Golang Diaries II by chongli on Wednesday July 17, 2013 @02:28PM (#6059315)
You are coming from Java.

Nope. Clojure and Haskell. Clojure:

    user=> (sort > (vals {:foo 5, :bar 2, :baz 10}))
    (10 5 2)
Haskell:

    >>> sortBy (flip compare) . map snd $ [("foo", 5), ("bar", 2), ("baz", 10)]
    [10,5,2]

There are no comments on this comment yet.