Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: