Hacker News new | ask | show | jobs
by stouset 544 days ago
On the other hand Ruby has the Schwartzian transform baked in :)

    foo.sort    { |a,b| a.expensive <=> b.expensive } # basic
    foo.sort_by { |a,b| a.expensive <=> b.expensive } # Schwartz-enabled